我有以下数组:
$keys
array (size=2)
0 => string 'foo' (length=3)
1 => string 'buz' (length=3)
$data
array (size=3)
'foo' => int 1
'bar' => int 2
'buz' => int 3
如何获取按值$data
过滤的数组?$keys
期望的输出:
array (size=3)
'foo' => int 1
'buz' => int 3