Can I make an associative array from two columns? I want column A as key and column B as value.
-------------
| id | name |
-------------
| 1 | sky |
-------------
| 2 | space |
I want a function that make result like this:
$ary=array('1'=>'sky','2'=>'space', ... );
Is any php function exist about this matter?
I'm using php, mysql and codeigniter.