I have a PHP array, actually a MySQL row constructed with CodeIgniter's Active Record.
So I have an array which var_dumps like this :
array (size=10)
0 =>
array (size=4)
'user_id' => string '2' (length=1)
'puzzle_id' => string '17' (length=2)
'birth' => string '2014-01-26 16:08:25' (length=19)
1 =>
array (size=4)
'user_id' => string '2' (length=1)
'puzzle_id' => string '16' (length=2)
'birth' => string '2014-01-26 02:07:05' (length=19)
2 => .....
this is constructed like this :
$this->db->order_by("birth" , "desc");
$rows = $this->db->get("my_table" , $limit)->result_array();
foreach($rows as $row)
{
$row['testindex'] = "testvalue";
}
return $rows;
so why does my array NOT have the "testindex" indices ?
Thanks for any help !