Welcome Guest, Not a member yet? Register   Sign In
Can i pass two database table in the model to the controller to the view?
#4

[eluser]kanjimaster[/eluser]
Remember that $data is just an associative array whose indexes will end up as variables in the view so you can simply do this

Code:
...
$data[‘menu’] = $this-menu_model->get_menu();
$data[‘inbox’] = $this->inboxmsg_model->get_inbox();
$this->load->view(‘inboxmsgview’, $data);

and you'll have two variables $menu and $inbox waiting for you in the view. It's quite normal to pass lots of variables this way.


Messages In This Thread
Can i pass two database table in the model to the controller to the view? - by El Forum - 05-25-2012, 09:43 AM



Theme © iAndrew 2016 - Forum software by © MyBB