Variable Reference as Function Argument
问题 All about a Zend Application with an action helper. I want to unset some pairs of an array by a function. helper: class Application_Controller_Action_Helper_TestHelper extends Zend_Contr[...] { public function direct(&$array) { if(isset($array['key'])) unset($array['key']); } } controller: $this->_helper->TestHelper($var); How could I get it working? 回答1: You must also pass it as reference : $this->_helper->TestHelper(&$var); UPDATE: Ups, I had my errors turned off. You (and now me) are