Re: ordering vars in an array

From: Date: Fri, 01 Nov 2002 21:15:37 +0000
Subject: Re: ordering vars in an array
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-16675@lists.php.net to get a copy of this message
Thanks peeps for you time I think I'll use sort since they're already integers ----- Original Message ----- From: Dash McElroy <dash.php@westonefcu.org> To: 'DaMouse' <damouse@ntlworld.com>; PHP - Win <php-windows@lists.php.net> Sent: Friday, November 01, 2002 9:02 PM Subject: RE: [PHP-WIN] ordering vars in an array > 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 > >

« previous php.windows (#16675) next »