I would like to count all the repeated values in a mysql result array. For example
array (
[0] = > array (
["id"] => 1
["n"] => "ab"
)
[1] = > array (
["id"] => 5
["n"] => "bc"
)
[2] = > array (
["id"] => 4
["n"] => "cd"
)
[3] = > array (
["id"] => 1
["n"] => "ef"
)
)
So, taking the multidemensional array above, I want to count the amount of times each value of id is repeated in the array.
The result would be
1 = 2 times
5 = 1 time
4 = 1 time
I know I can do this with the array_search() function, but in my case, I don't know what i'm searching for. I just need the amount of results that have a specific repeated value.