Hi all, I want to create an array that can be generates dynamically, here is the example
I am going to loop this numbers
3
4
2
3
4
1
4
I dont know in advance how many numbers will be.
this is the result I want: $result=array(1=>1,2=>1,3=>2,4=>3)
I want to have the key and the count of each number.
Thanks in advance
Dinamic array
Moderator: General Moderators
Re: Dinamic array
I just found out I can use this function : array_count_values($array);