[eluser]smickiedoo[/eluser]
So it no longer throws an error but the data is still not being appended.
I tried:
Code:
$data['something'] = array('id' => 1, 'name' => 'title 1', 'more_data'=>'hello world');
foreach($query->result() as $row)
{
array_push(
$data['something'], array('id'=>$row->id, 'name'=>$row->name, 'more_data'=>$row->more_data )
);
}
and in my view:
Code:
foreach($something as $item) { echo($item['id']); }
It outputs only:
1