Hello everyone i have some question about query on PHP using MySQL database.
I have table name test2 like this
testid asd
1 A
2 B
3 C
4 D
and then i have query like this
public function m_get_wer() {
$sql = "SELECT `asd` FROM test2";
$data = $this->db->query($sql)->result_array();
return $data;
}
when i used print_r on that query, the result like this
Array ( [0] => Array ( [asd] => A ) [1] => Array ( [asd] => B ) [2] => Array ( [asd] => C ) [3] => Array ( [asd] => D ) )
but the result that i need is like this
Array ( [0] => A [1] => B [2] => C [3] => D )
How i can get result like that. thanks.