My array with countries is:
$cars = array( [\'brand\' => \'bmw\', \'place_1\' => \'Munich\', \'place_2\' => \'Cologne\'], [\'brand\' => \'vw\
Not tested but something like this
function arraySelect($arr,$brand){ $selection=[]; foreach($arr as $a){ if($a["brand"]=$brand{ array_push($selection,$a); } } return $selection; }