Welcome Guest, Not a member yet? Register   Sign In
I can't to do works two functions at same times.
#3

[eluser]tpetrone[/eluser]
so I think your asking is how to return data from two different models from within the same controller, then load the data into the view.

Code:
$data1 = $this->your_model->get_some_data();

$data2 = $this->other_model->get_some_other_data();

$final_data = array($data1, $data2);

$this->load->view('your_view', $final_data);


or instead of $final_data.... below might work better.. I am sure there are several ways to get this done.


$data = array_merge($data1, $data2);

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


Messages In This Thread
I can't to do works two functions at same times. - by El Forum - 10-12-2012, 05:55 AM
I can't to do works two functions at same times. - by El Forum - 10-12-2012, 09:40 AM
I can't to do works two functions at same times. - by El Forum - 10-12-2012, 05:52 PM
I can't to do works two functions at same times. - by El Forum - 10-12-2012, 07:26 PM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:19 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:27 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:40 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:49 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 09:56 AM
I can't to do works two functions at same times. - by El Forum - 10-13-2012, 11:28 AM
I can't to do works two functions at same times. - by El Forum - 10-14-2012, 02:37 PM
I can't to do works two functions at same times. - by El Forum - 10-14-2012, 02:51 PM



Theme © iAndrew 2016 - Forum software by © MyBB