I have an array like this
$arr = array(1,1,1,2,2,3,3,1,1,2,2,3);
I found one function array_count_values . but he will group all the same meaning and count them all and break the sequence.
$result[1] = 5 $result[2] = 4 $result[3] = 3
how to create a count array group that will follow a sequence. the result that I really want:
[1] = 3; [2] = 2; [3] = 2; [2] = 2; [3] = 1;
source share