I have a PHP array that is returning dynamic values as follows:
Array
(
[0] => Array
(
[user_id] => 1234
)
[1] => Array
(
[user_id] => 9876
)
)
Problem is that I want to find out what array key user_id 9876 has, but because user_id is a sub array I can't simply do an array flip and then look it up like that. I tried doing an array flip method like below but the array flip doesnt work
$fliparray = array_flip($original);
echo $fliparray['7876'];