Welcome Guest, Not a member yet? Register   Sign In
Non-associative array in codeigniter
#1

[eluser]Unknown[/eluser]
CodeIgniter always returns associative array from model.
suppose I want to get "name" from "user_master" table.So i have written the following query in model

$rows = $this->db->select('Name')
->from('user_master')->get()->result_array();
And the result is as follows:
Array
(
[0] => Array
(
[Name] => Sumanta
)
)
But I want the result as follows

Array(
[0]=>Sumanta
)

How I'll will get it?


Messages In This Thread
Non-associative array in codeigniter - by El Forum - 02-23-2013, 04:06 AM
Non-associative array in codeigniter - by El Forum - 02-23-2013, 07:31 AM



Theme © iAndrew 2016 - Forum software by © MyBB