Array
(
[0] => Array
(
[song] => More Than A Feeling
[artist] => Not Boston
[time] => 15:00
)
[1] => Array
(
[song] => More Than A Feeling
[artist] => Boston
[time] => 11:20
)
[2] => Array
(
[song] => More Than A Feeling
[artist] => Boston
[time] => 15:23
)
)
Have an array of arrays like this. I am trying to count all matches. Right now i'm using
array_count_values(array_column($arr, 'song'));
That's good but it counts songs if the artist doesn't match. I am trying to output the following.
Array
(
[0] => Array
(
[song] => More Than A Feeling
[artist] => Not Boston
[count] => 1
)
[1] => Array
(
[song] => More Than A Feeling
[artist] => Boston
[count] => 2
)
)
Not sure where to start. Thanks for the help!