I have an array where I want to search the uid and get the key of the array.
uid
Assume we have the following 2-dimensional array:
Here is one liner for the same,
$pic_square = $userdb[array_search($uid,array_column($userdb, 'uid'))]['pic_square'];