How to pass the value from the controller to a view
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.
Trackback address for this post
Trackback URL (right click and copy shortcut/link location)
Feedback awaiting moderation
This post has 81 feedbacks awaiting moderation...
Form is loading...