I am implementing a MVC component. I wish to pass a value from the controller to the view for displaying. This is very easy. You need to assign the value from the controller.
Code:
$view = &$this->getView('viewname','fromat','prefix'); | |
$view->assign('ids','1,2,4'); |
Then in the view:
Code:
$ids=$this->get('ids'); |
That is easy.
Recent comments