NYCPHP Meetup

NYPHP.org

[nycphp-talk] A Bit of Array Trouble

Carlos A Hoyos cahoyos at us.ibm.com
Fri Feb 10 13:30:08 EST 2006


> what i need to do is loop over the vendor locations and sort them
> based on the distance.  Currently it looks sorted but that is only
> because 2 records are showing.

You can use usort with a function that compares the distance key.

See example 2:  http://us2.php.net/manual/en/function.usort.php

Carlos





More information about the talk mailing list