How to reverse sort the contents of an array?
By Arun Desai
Hi,
How to reverse sort the contents of an array
Teacher SiliconIndia replied to Arun Desai Wednesday, March 10, 2010
Hi Desai,
Answer to your question is simple,just use rsort()
For example:
<?php
$arr = array("you","are","how","hi,");
rsort($arr);
print_r($arr);
?>
printing to the screen:
Array
(
[0] => hi,
[1] => how
[2] => are
[3] => you
)