I just don't understand, I have code like this:
$this->ci->db->select('liked_posts, liked_comments');
$q = $this->ci->db->get_where('users_fav', array('usr_id' => $this->_usrId));
$result = $q->result_array();
And when I, as always, tried to put it into foreach loop.. it's just didn't work.. Because in $result I've got and array where 2 more arrays where stored (table fields) so to work in foreach loop it would look like this:
foreach ($result[0] as $value)
not:
foreach ($result as $value)
And I was looking for my mistake very long.. Maybe I really did something wrong... Or is it a bug?
edit: print_r($result);
Array
(
[0] => Array
(
[liked_posts] => a:0:{}
[liked_comments] => a:0:{}
)
)
edit2:
But shouldn't it be like this:
Array
(
[liked_posts] => a:0:{}
[liked_comments] => a:0:{}
)
$resultlooks like what is to be expected...