RE: [PHP-WIN] ordering vars in an array
| From: | Dash McElroy | Date: | Fri, 01 Nov 2002 21:02:40 +0000 |
| Subject: | RE: [PHP-WIN] ordering vars in an array | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-16673@lists.php.net to get a copy of this message | ||
Try sort (http://www.php.net/manual/en/function.sort.php
<http://www.php.net/manual/en/function.sort.php>
). You're sorting numbers,
so you'd probably want to do this:
$array = sort($array, SORT_NUMERIC);
-Dash
-----Original Message-----
From: DaMouse [mailto:damouse@ntlworld.com]
Sent: Friday, November 01, 2002 12:15 PM
To: PHP - Win
Subject: [PHP-WIN] ordering vars in an array
right I've got an array full of integers 0,6,7,8,9,10
only problem is because I grabbed these out of a directory list they are
ordered
0,10,6,7,8,9 anyone got an idea how to rearrange the array to make them go
the correct way
O
Ensign Baker
HCO Officer
USS Atlantis