Loading Data To Different Sections of Page

Hello all!

Trying to do:
Display different sets of data (same model different functions) on 1 view.

Stumped on:
In my controller, how do I specify two calls for different data and display that data in the same view (say one set of in left column and the other set in the right column of a two column table)?

Thanks for the newbie help! :down:


You mean something like this?


$data['left'] = $this->mymodel->left();
$data['right'] = $this->mymodel->right();

$this->load->view('view', $data);

<div id="left">&lt;?=$left?&gt;</div>
<div id="right">&lt;?=$right?&gt;</div>

Thank you so much foyer. Everything worked perfectly! I appreciate your help.


[eluser]Zeeshan Rasool[/eluser]
You can also use parser helper to parse these partials in your main view.

Digg   Delicious   Reddit   Facebook   Twitter   StumbleUpon  

  Theme © 2014 iAndrew  
Powered By MyBB, © 2002-2021 MyBB Group.