I've got an array called $rank_array:Array ( [Tribus Bella] => 179 ) Array ( [TestClan] => 767 )
When I run this code:
foreach ($rank_array as $clan => $rank) {
echo $clan.' = '.$rank.'<br />';
}
I get the following:
Tribus Bella = 179
TestClan = 767
I'd like to display it in the reverse order (so the it's ordered by the $rank variable), but when I use something like asort it doesn't change the order at all.
Can anyone help explain why? And help me fix it?
edit
None of the functions seem to be working (arsort, asort, etc) so I'm wondering if it's the way I'm inserting the data into the array.
I'm inserting it with this code
$rank_array = array($q['name'] => $clan_total_points);
Is that wrong?