我需要一些帮助来获取数组元素数量的计数,方法是根据 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
)
)