Re[2]: PHP sort
by Nathan Lyle <nathan(at)upwebmaestro.com>
|
Date: |
Sun, 26 Jan 2003 00:02:43 -0500 |
To: |
hwg-techniques <hwg-techniques(at)hwg.org> |
References: |
upwebmaestro wnm |
|
todo: View
Thread,
Original
|
|
<Alice>
> what kind of sort are you looking for?
natsort
> try: sort($trackline,SORT_NUMERIC); or SORT_ASC
Nope... I tried that before I finally figured out my problem. I was
using a "for" loop to run through and print the array, but by doing so
I was bypassing PHP's natural sorting results. I used the "foreach"
instead and it works beautifully.
Thanks for the suggestion though!
~ Nathan Lyle (The U.P. Web Maestro)
Web: www.upwebmaestro.com E-Mail: nathan(at)upwebmaestro.com
Phone: (906)485-4806
"Where a calculator on the ENIAC is equipped with 18,000 vacuum
tubes and weighs 30 tons, computers of the future may have only
1,000 vacuum tubes and perhaps weigh 1.5 tons." - Popular Mechanics, March 1949.
HWG hwg-techniques mailing list archives,
maintained by Webmasters @ IWA