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/

Go to topic 9016

Return to index page 960
Return to index page 959
Return to index page 958
Return to index page 957
Return to index page 956
Return to index page 955
Return to index page 954
Return to index page 953
Return to index page 952
Return to index page 951