The following code are written in CodeIgniter, as a method of my model.
function get_user () {
$result = $this->db->get('users_table')->result();
}
the $result is the resulting array of objects as the result of running database query, what is the best way to convert $result in an array?
$resultis actually already an array, you canforeach($result as $k=>$v){ echo $v['columnName'];var_dump($result);and see if it starts off with aarray ( ......result_array() instead of result().......