可能重复:
PHP如何组由特定值的多维数组?
使用多维阵列由SUM PHP组
我需要通过分组它基于PHP中的多维数组的日期值部分入门数组元素数量的计数一些帮助
这是我原来的数组
Array
(
[0] => Array
(
[quantity] => 5
[dd] => 01-Nov-2012
)
[1] => Array
(
[quantity] => 10
[dd] => 01-Nov-2012
)
[2] => Array
(
[quantity] => 3
[dd] => 02-Nov-2012
)
[3] => Array
(
[quantity] => 4
[dd] => 03-Nov-2012
)
[3] => Array
(
[quantity] => 15
[dd] => 03-Nov-2012
)
)
这是我期待的输出
Array
(
[0] => Array
(
[quantity] => 15
[dd] => 01-Nov-2012
)
[1] => Array
(
[quantity] => 3
[dd] => 02-Nov-2012
)
[2] => Array
(
[quantity] => 19
[dd] => 03-Nov-2012
)
)