On Friday 28 February 2003 23:28, Jim Long wrote: > Hi, > > Does anyone know how to make the flag "sort_numeric" work? > Will it work with asort? > > asort ($numeric_array, SORT_NUMERIC); > I've tried this but it looks like it's having problems with the comma in > big numbers.
What comma in big numbers? Numbers aren't supposed to have commas. If it has a comma it's a string. > I'm not absolutely sure, but it looks like it's ignoring everything > after a comma when it sorts. Snippet from the manual "The value is given by the initial portion of the string. If the string starts with valid numeric data, this will be the value used.". As a comma is not valid numeric data, it and everything after, will be ignored. -- Jason Wong -> Gremlins Associates -> www.gremlins.biz Open Source Software Systems Integrators * Web Design & Hosting * Internet & Intranet Applications Development * ------------------------------------------ Search the list archives before you post http://marc.theaimsgroup.com/?l=php-general ------------------------------------------ /* "It may be that our role on this planet is not to worship God but to create him." -Arthur C. Clarke */ -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php