Assume we have the following 2-dimensional array:
$userdb = array(
array(
'uid' => '100',
'name' => 'Sandra Shush',
'pic_square' => 'urlof100'
),
array(
'uid' => '5465',
'name' => 'Stefanie Mcmohn',
'pic_square' => 'urlof100'
),
array(
'uid' => '40489',
'name' => 'Michael',
'pic_square' => 'urlof40489'
)
);
If I want to search a key I can use (and get 0 in this example):
$key = array_search('100', array_column($userdb, 'uid'));
But what do I use if I want to get the key for two attributes that should match a specific value. Like I want to search for the key that has uid = '100' AND name = 'Sandra Shush' ?