I have this array in the beginning
Array
(
[0] => FRUIT
[1] => MONKEY
[2] => MONKEY
[3] => MONKEY
[4] => CANNABIS
)
with array_count_values() I get this
Array
(
[FRUIT] => 1
[MONKEY] => 3
[CANNABIS] => 1
)
but actually I would like to sort it like here:
MONKEY 3
FRUIT 1
CANNABIS 1 (when the Integer is the same it doesn't have to get extra sorted alphabetic, that's not necessary)
I looked around, but couldn't find something appropriate.
Thank you in advance!