Re: Brain Twister
| From: | Jason Soza | Date: | Thu, 25 Jul 2002 19:47:42 +0000 |
| Subject: | Re: Brain Twister | ||
| Groups: | php.windows | ||
| Request: | Send a blank email to php-windows+get-14950@lists.php.net to get a copy of this message | ||
Maybe use sort(), asort(), or array_multisort()? I'm sure one of them
would do what you're looking for.
asort()
http://www.php.net/manual/en/function.asort.php
sort()
http://www.php.net/manual/en/function.sort.php
array_multisort()
http://www.php.net/manual/en/function.array-multisort.php
Jason Soza
----- Original Message -----
From: "R.S. Herhuth" <ronherhuth@pop.mindspring.com>
Date: Thursday, July 25, 2002 11:09 am
Subject: [PHP-WIN] Brain Twister
>
> I have a series of offices (11 at the present time). Each office
> has a
> CITY STATE ZIPCODE and a MILEAGE. What I need to do is to sort
> them by
> mileage which is dynamically calculated earlier in the script. I need
> the offices to be stored in an array and sorted by the MILEAGE after
> which I will return them in the order that they have been sorted.
>
> How can I do this?
>
> Ron
>
> --
> PHP Windows Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>