I have searched this question a lot. But I could not find a proper solution anywhere. Just like you do an array_count_values()
for a single dimensional array, what do you do for a multi dimensional array if you want similar type of a solution?
For example-
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
)
)
The output that I want is-
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
How do I do this?
See Question&Answers more detail:
os 与恶龙缠斗过久,自身亦成为恶龙;凝视深渊过久,深渊将回以凝视…