i want to convert multidimensional array to single array
I am having this array
array (
0 => array ( 'sno' => 'q3', 'result' => '15', ),
1 => array ( 'sno' => 'q1', 'result' => '5', ),
2 => array ( 'sno' => 'q2', 'result' => '10', ),
)
i want this resulting array
array ( 'q3' => '15', 'q1' => '5','q2' =>'10' )
i tried foreach, but it gives the values (not an array ) like q3 15 q1 5 q2 10