Hi
I have an array, of several elements (which I populate from reading from a db) that may or may not have duplicate values in it.
I want to sort the array so that the value that occurs the most amount of times is top, etc, so when I output the array, it is in order of the most frequent occuring value to the least.
If there's no duplicate values then I'll want to reverse the array - and i know array_reverse() will do that.
I've seen usort() but I'm not sure if that's what I need.
Can anyone help!
Thanks.