I need to create the following array from a query in codeigniter. So far what I'm producing is not what I'm looking for.
What I need...
array (size=4)
1 => string '1414277999' (length=10)
2 => string '1470411334' (length=10)
3 => string '1456617599' (length=10)
4 => string '1461538799' (length=10)
What I currently have..
array (size=4)
0 =>
object(stdClass)[35]
public 'session' => string '1' (length=1)
public 'end' => string '1477090799' (length=10)
1 =>
object(stdClass)[36]
public 'session' => string '2' (length=1)
public 'end' => string '1481932799' (length=10)
2 =>
object(stdClass)[37]
public 'session' => string '3' (length=1)
public 'end' => string '1488585599' (length=10)
3 =>
object(stdClass)[38]
public 'session' => string '4' (length=1)
public 'end' => string '1493420399' (length=10)
This is my query in codeigniter..
$bd = $this->db->select('session, end')
->from('session_dates')
->where('end >=', $now)
->get();
return $bd->result();
Can someone point me in the direction of how to build my query to create the array I'm looking for?
result_array@ first result with this question :codeigniter get array from query