|
Subject:
|
sort numbers
|
|
Posted By:
|
hosefo81
|
Post Date:
|
1/28/2004 7:50:13 AM
|
i would like to sort an array in decreasing order but don't know how. $Sales = array (37, 57, 64, 58, 100, 76, 120); given the array above, could someone please write me the code how to sort it into 120, 100, 76, 64, 58, 57, 37?
|
|
Reply By:
|
nikolai
|
Reply Date:
|
1/28/2004 1:06:57 PM
|
http://www.php.net/rsort
That server is down right now, perhaps you should use a mirror: http://my.php.net/rsort
$sorted_sales = rsort($Sales, SORT_NUMERIC);
Take care,
Nik http://www.bigaction.org/
|
|