我已经搜索了很多这个问题。但是我在任何地方都找不到合适的解决方案。就像你array_count_values()
为一维数组做一个一样,如果你想要类似类型的解决方案,你对多维数组做了什么?
例如-
Array
(
[0] => Array
(
[07/11] => 134
)
[1] => Array
(
[07/11] => 134
)
[2] => Array
(
[07/11] => 145
)
[3] => Array
(
[07/11] => 145
)
[4] => Array
(
[07/12] => 134
)
[5] => Array
(
[07/12] => 99
)
)
我想要的输出是-
Date: 07/11, ID: 134, Count: 2
Date: 07/11, ID: 145, Count: 2
Date: 07/12, ID: 135, Count: 1
Date: 07/12, ID: 99, Count: 1
我该怎么做呢?