I have Multidimensional array with key value pair so I want to flip i.e key gets to value place and values get to key place but I am getting error
My Php code is:
echo '<pre>',print_r($res),'</pre>';
output when print_r($res):
Array
(
[0] => Array
(
[userid] => 1
)
[1] => Array
(
[userid] => 2
)
[2] => Array
(
[userid] => 3
)
)
getting error in output when want to flip this array:
array_flip(): Can only flip STRING and INTEGER values!
How to solve this?