PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!
The problem with rsort is that it won't show you the numbers, just the frequency that they occur.
Eg rsort output would be:
Array
(
[0] => 3
[1] => 3
[2] => 3
[3] => 1
[4] => 1
[5] => 1
)
and arsort output would be:
Array
(
[4] => 3
[1] => 3
[3] => 3
[6] => 1
[5] => 1
[2] => 1
)
Yes true, I was thinking one thing, wrote another.
The thought was that (taking your example) $ordered[0] will always give your the highest number, and so on. Might be easier if you do not actually need the frequency...