如何按列值对子数组进行分组?
我有以下数组
Array
(
[0] => Array
(
[id] => 96
[shipping_no] => 212755-1
[part_no] => reterty
[description] => tyrfyt
[packaging_type] => PC
)
[1] => Array
(
[id] => 96
[shipping_no] => 212755-1
[part_no] => dftgtryh
[description] => dfhgfyh
[packaging_type] => PC
)
[2] => Array
(
[id] => 97
[shipping_no] => 212755-2
[part_no] => ZeoDark
[description] => s%c%s%c%s
[packaging_type] => PC
)
)
如何按?是否有任何本机php函数可用于执行此操作?id
虽然这种方法有效,但我想使用a来执行此操作,因为使用上述方法,我将获得重复的项目,我试图避免?foreach
在上面的例子中有2个项目,所以它需要在id
id