Here is my situation, I have an array containing say 50 numbers in it ( array(1,2,3,4,5,6,7,8,9,10,etc etc) ) and there will be many duplicates in it. I am trying to return the top ten numbers in it, in order from greatest to least. I can return the most common one, but I need the most common ten. This is what I have tried:
$final_results contains an array of numbers [0][10],[1][23],[2][0],[3][5] etc etc
array_count_values($final_results) will return the number of times each number is duplicated in a new array, in the form [number][duplications] and it preserves the number
Anything I do after that point replaces [number] with [0][1][2] for say the 3 most common if that makes sense
Thanks for the help!