try extract($this->passedArgs). This gets all keys as variables into
the local namespace (see php manual). But beware that this can be very
insecure with untrusted data.

:jc

On 11 Apr., 18:27, "bato" <[EMAIL PROTECTED]> wrote:
> Hi all,
>
> I have seen in cake 1.2 that $this->passedArgs return an array of
> parameters passed in GET in the follow way
>
> /app/controller/action/name1:var1/name2:var2
>
> the passedArgs array will be
>
> array (
>       name1 => var1
>       name2 => var2
> )
>
> the action of my controller is
>
> action(name1=null, name2=null) {
> ........
>
> }
>
> I would like to map the passedArgs with variables (name1, name2) in my
> controller so I could refer their by $name1 and $name2 in the action.
>
> Is this possible auomatically in some way? or I have to set it
> manually in every controller like
>
> if (!empty($this->passedArgs["name1"])) $name1 = $this-
>
> >passedArgs["name1"]    ?
>
> I would like my app works fine in cake traditional mode app/controller/
> action/var1/var2 that in custom url with parameters separated by
> semicolon.


--~--~---------~--~----~------------~-------~--~----~
You received this message because you are subscribed to the Google Groups "Cake 
PHP" group.
To post to this group, send email to [email protected]
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cake-php?hl=en
-~----------~----~----~----~------~----~------~--~---

Reply via email to