[eluser]Samuurai[/eluser]
I think i'm having a bit of a dull moment, but I was looking at my code and wondering if I do really need a foreach when displaying the query results.
My model does the query and returns $query->result();
I then pass that to my view as $data->result
Then in my view I do a
foreach($result as $row)
Then I access the data using $row->firstname or whatever.
I want to pass the data to my views from the controller.. I've tried various differnt combinations of $result->row()->firstname, but I keep getting errors like "Call to member function on a non-object.
Do I really need the foreach?