get stuck: given an array like:
$customers = array(
'C00005' => 'My customer',
'C02325' => 'Another customer',
'C01945' => 'Another one',
'C00586' => 'ACME inc.'
)
and given a querystring like ?customerID=C01945
($_GET['customerID'] = 'C01945'
), how can I filter the array so that it returns:
$customers = array(
'C01945' => 'Another one'
)
You can just use
array_instersect_key
: