已关闭,此问题需要更focused。它目前不接受回答。
**想改善这个问题吗?**更新问题,使其只关注editing this post的一个问题。
23小时前关闭
Improve this question
[0] => Array
(
[event_date] => 2023-10-15
[sale_id] => 11959
[product_name] => 10x10 Commercial Pop-Up Tent | IMPACT Poly Top
[product_id] => 14
[qty_stock] => 3
[qty_booked] => 10
[qty_deficit] => -7
[eventDate] => 2023-10-13
[pickupDate] => 2023-10-16
)
[1] => Array
(
[event_date] => 2023-10-15
[sale_id] => 11959
[product_name] => 10x10 Commercial Pop-Up Tent | IMPACT Poly Top
[product_id] => 14
[qty_stock] => 3
[qty_booked] => 10
[qty_deficit] => -7
[eventDate] => 2023-10-15
[pickupDate] => 2023-10-15
)
我只需要一个数组元素。
[0] => Array
(
[event_date] => 2023-10-15
[sale_id] => 11959
[product_name] => 10x10 Commercial Pop-Up Tent | IMPACT Poly Top
[product_id] => 14
[qty_stock] => 3
[qty_booked] => 10
[qty_deficit] => -7
[eventDate] => 2023-10-13
[pickupDate] => 2023-10-16
)
1条答案
按热度按时间x0fgdtte1#
一个选项可以是使用自定义过滤器函数,如:
这当然要求数组元素中的键总是以相同的顺序出现,并且你希望根据all键进行唯一过滤。