In a controller, what is the most appropriate way to call the action of another controller and also pass an array as parameter?
I know that you can use requestAction
As of CakePHP 1.2.5, you should be able to pass various parameter types through the second parameter in requestAction(). e.g.:
$this->requestAction('/users/view', array('pass' => array('123')));
Then in the UsersController:
function view($id) {
echo $id; // should echo 123 I believe, otherwise try $this->params['pass'].
}
Instead of using 'pass' above, you can alternatively try 'form' and 'named' to pass form/named parameters respectively.