I am using _forward() helper to pass an array from one to another action.. but i don’t know how can i access this array in my receiving action.. here is the _forward() helper i am using
$this->_forward('action', 'controller', 'null', $Myarray);
is this correct and how can i access this $Myarray in my another action of same controller
If you were to
_forward()a request to another controller/action, you would access the params you passed by calling$this->getRequest()->getParam('param');from the controller action that was the handler for the forward.Example:
If
$Myarrayis not an array with key-value pairs or you want to access it from a single parameter, you would want to set the 4th parameter of_forward()to something likearray('myarrayparam' => $Myarray)and then receive it with$this->getRequest()->getParam('myarrayparam', array());