FUNCTION SORT BY REVERSE SORT MAINTAIN KEY/VALUE CORRELATION
sort Value No No
rsort Value Yes No
asort Value No Yes
arsort Value Yes Yes
ksort Key No Yes
krsort Key Yes Yes
usort Value User-defined No
uasort Value User-defined Yes
uksort Key User-defined Yes
$nums = array(15, 2.2, -4, 2.3, 10);
sort($nums);
printf("%s
\n", var_export($nums, TRUE));
$words = array('bird', 'fish', 'George', 'Aden');
sort($words);
printf("%s
\n", var_export($words, TRUE));
$dogs = array('A' => 'C', 'B' => 'D', 'X' => 'Z', 'Q' => 'T');
sort($dogs);
printf("%s
\n", var_export($dogs, TRUE));
?>