Serialize the array and then unserialize it in the controller. So it
would be:
$myarray = array('stuff'=>'goes in here'...);
$html = $this->requestAction('controller/action/' .
serialize($myarray));
And then in the controller:
function action($data) {
$myarray = unserialize($data);
//access $myarray as normal PHP array now
}
HTH,
Ryan Rose
http://www.digiwize.com
On Jan 26, 6:51 pm, "Leo" <[EMAIL PROTECTED]> wrote:
> Hi All,
>
> I need to get the rendered output of a controller on a variable. I used
> $this->requestAction() sucessfully, however i would like to pass an
> array to the controller's method before rendering it.
>
> Something like this:
>
> $myarray = array('stuff'=>'goes in here'...);
> $html = $this->requestAction('controller/action/$myarray');
>
> Of course, i know that i cant pass arrays through strings like that,
> but i hope that it cleared out what i need to do... Have been
> considering using the dispatcher, but i havent figured out how i can
> reach its controller object.
>
> best regards
--~--~---------~--~----~------------~-------~--~----~
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
-~----------~----~----~----~------~----~------~--~---