我有 2 个用 php 编写的数组代码
Array
(
[qty_ordered] => 12.0000
[product_id] => 2080
[product_name] => Watchadmin1
[product_price] => 1010.0000
)
Array
(
[qty_ordered] => 11.0000
[product_id] => 2086
[product_name] => WatchAdmin88
[product_price] => 1010.0000
)
Array
(
[qty_ordered] => 11.0000
[product_id] => 2076
[product_name] => admin3
[product_price] => 1010.0000
)
第二个数组集合是
Array
(
[entity_id] => 2080
[sku] => Watchadmin1
[current_user_id] => 1
)
Array
(
[entity_id] => 2081
[sku] => Watchadmin8
[current_user_id] => 1
)
Array
(
[entity_id] => 2082
[sku] => abc
[current_user_id] => 1
)
当第一个数组的 product_id 和第二个数组的 entity_id 相同时,我想从第一个数组中获取所有产品并存储另一个新数组。恩product_id=2080和entity_id=2080 ,那么这个数组将节省另一个数组。
你能指导我最好的代码吗?
鸿蒙传说
动漫人物