Answer the question
In order to leave comments, you need to log in
How to find out how many times each element of an array is repeated?
I have such an array for example
array(1612) {
[0]=>
array(1) {
["user_id"]=>
string(2) "37"
}
[1]=>
array(1) {
["user_id"]=>
string(2) "58"
}
[2]=>
array(1) {
["user_id"]=>
string(2) "58"
}
[3]=>
array(1) {
["user_id"]=>
string(2) "21"
}
[4]=>
array(1) {
["user_id"]=>
string(2) "41"
}
[5]=>
array(1) {
["user_id"]=>
string(2) "58"
}
[6]=>
array(1) {
["user_id"]=>
string(3) "110"
}
[190]=>
array(1) {
["user_id"]=>
string(2) "69"
}
[1093]=>
array(1) {
["user_id"]=>
string(2) "70"
}
[1094]=>
array(1) {
["user_id"]=>
string(2) "70"
}
[1095]=>
array(1) {
["user_id"]=>
string(2) "70"
}
[1096]=>
array(1) {
["user_id"]=>
string(2) "70"
}
}
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question