I have an array
$array = ['f'=>'foo', 'f'=>'foo', 'f'=>'foo','g'=>'good'];
and I want to delete only one item from this array with matching key, like the following:
unset($array['f']);
However, this will delete the all items with this matching key 'f' and only one item will remain. Is there a way to do something like this, but apply it only to the first matching item in the array?