I have function
public myfunction($myArray) {
}
I need to pass array("cat", "dog")
To action.
$output = $this->requestAction(
array('controller' => 'app', 'action' => 'myfunction'),
array("cat","dog")
);
But this passes only cat
to my controller action, dog
wasn't passed.
I tried this:
$output = $this->requestAction(
array('controller' => 'app', 'action' => 'myfunction'),
array("myArray" => array("cat","dog"))
);
But it didn't help. I checked cookbook but couldn't find relevant example. How can I fix this? Thank you
Try:
Try this code
in Myfunction :
Tell me if not working...
see tho url
http://book.cakephp.org/1.3/view/991/requestAction
how to pass argument in cakephp requestAction?
try this
after then get $option array and explode it.