how to get the variable value from controller in the view |
[eluser]luffy[/eluser]
I have read the view user guide http://ellislab.com/codeigniter/user-gui...views.html I found it's not smarty to get the variable value from controller. $data['title'] = "My Real Title"; $data['heading'] = "My Real Heading"; $this->load->view('blogview', $data); In zend framework, If I want to do the same function. $this->view->abc = 'test'; And then, I can use $this->abc in the view file. Does Ci have the same function?
[eluser]PromaneX[/eluser]
If you used $data['title'] then your view just needs to use $title to get at the data stored in there. <?=$title?> |
Welcome Guest, Not a member yet? Register Sign In |