What's the best way to COUNT and SORT multiple values of an array.
Example:
Timeless
Links
Timeless
Orangles
Kiwis
Apples
Timeless
Link
Bannana
Apples
I need to get THIS in the end result:
4 Timless
2 Apples
1 Links
1 Orangles
1 Kiwis
1 Link
1 Bannana
I know about array_keys() with the search thingy will return how many times a variable occurs in an array, but how would I add up EXACT matches, then RESORT based on MAXIMUM occurances of that word/variable all the way down to least occurances? And I need to REMOVE duplicates array_unique() I think will work, but I need to have the number times it was in the array as well....
Any bright ideas?