Code:
$namen = array("hans"=>"1","tom"=>"2","ich"=>"13","gott"=>"9"); rsort($namen); foreach ($namen as $key => $value) { echo "Key: ".$key." Value: ".$value." ";}
Key: 0 Value: 13
Key: 1 Value: 9
Key: 2 Value: 2
Key: 3 Value: 1
Es soll aber eher so aussehen:
Key: ich Value: 13
Key: gott Value: 9
Key: tom Value: 2
Key: hans Value: 1
Kommentar