$master = ['111' => 'foo', '124' => 'bar', '133' => 'baz'];
$check = ['111' => 14, '133' => 23 ]';
我想从中删除所有$master不存在的键$check。因此,此示例中的结果应为:
$master
$check
$newMaster = ['111' => 'foo', '133' => 'baz'];
任何想法如何做到这一点?提前致谢。