我有一个看起来像这样的数组:
Array
(
[333824-00A-BLK-10] => Array
(
[classId] => 44
[inv] => 0.000
[onOrder] => 0
[code] => 333824-00A-BLK-10
)
[333824-00A-BLK-10.5] => Array
(
[classId] => 44
[inv] => 0.000
[onOrder] => 0
[code] => 333824-00A-BLK-10.5
)
)
我想使用另一个如下所示的数组来过滤它:
Array
(
[0] => 333824-00A-BLK-10
[1] => 333824-00A-BLK-10.5
[2] => 333824-00A-BLK-11
[3] => 333824-00A-BLK-11.5
[4] => 333824-00A-BLK-12
)
我想将结果保留在数组中并删除不匹配的键。我尝试了一个用 foreach 过滤数组的函数,但没有运气。请问有什么帮助吗?谢谢!