Is there a way to return a non-associative array as a result of a CI db query?
Say, I have this table:
id | Name
1 | Name1
2 | Name2
3 | Name3
4 | Name4
I want the names to be returned as a non-associative array.
$this->db->select('tablename')->result_array() returns an associative array.
Is this even possible in CI? I don’t want to have to add an extra foreach statement if it is.
Please shed some light.
You could just use array_values(), which returns an array containing the values of your associative array.