$master = ['111' => 'foo', '124' => 'bar', '133' => 'baz'];
$check = ['111' => 14, '133' => 23 ]';
I want to remove all keys from $master
that do not exists in $check
.
So the result in this example should be:
$newMaster = ['111' => 'foo', '133' => 'baz'];
Any idea how to do this ? Thanks in advance.