hello members a anomaly in codeigniter im noticing
in my model im querying the database to get a list of user_id ONLY
$recs = $this->db->query('select id from users');
that was easy, but i want to return the result as an array
so i do
$reccs->result_array();
but now in my controller i want to check for in_array(124,$returned_array); this is not successful because codeigniter has encapsulated the array of id into a v big outer array something like this
Array ( [0] => Array ( [id] => 0 ) [1] => Array ( [id] => 11 ) [2] => Array ( [id] => 29 ))
how can i use the in_array php function to check only id ?
OR
how can i built a plain array just to store id something like
$demo = array();
foreach($recs as $r)
$demo = array($r->id);
Any suggestions ?