Welcome Guest, Not a member yet? Register   Sign In
Passing an Array from Model?
#2

[eluser]jalalski[/eluser]
Yup... that's correct.

the line:
Code:
$data['total_till_takings'] = $this->report_model->total_till_takings('20081209', $row->till);
is overriding the array with each iteration.
You possibly need this:
Code:
$data['total_till_takings'][] = $this->report_model->total_till_takings('20081209', $row->till);
to create an array of till takings.

And then in the view, iterate over it (not just print it out).


Messages In This Thread
Passing an Array from Model? - by El Forum - 01-09-2009, 08:24 AM
Passing an Array from Model? - by El Forum - 01-09-2009, 11:38 AM
Passing an Array from Model? - by El Forum - 01-09-2009, 12:59 PM
Passing an Array from Model? - by El Forum - 01-09-2009, 01:18 PM



Theme © iAndrew 2016 - Forum software by © MyBB