I have the following array:
Array (
[0] => Array ( [Country] => Americas [Out_Count] => 14 )
[1] => Array ( [Country] => Belgium [Out_Count] => 2 )
[2] => Array ( [Country] => China [Out_Count] => 33 )
[3] => Array ( [Country] => France [Out_Count] => 7 )
)
I have a variable as follows:
$los = 'Belgium';
What I'd like to do is search the array and bring back the value of Out_Count
to a variable.
I can use the following:
$key = array_search($los, array_column($outs, 'Country'));
This brings back the Key, in this case 1
for Belgium but I need the Out_Count
value and I'm utterly stumped on how to achieve this.
Any ideas and thoughts welcomed.