[nycphp-talk] How to sort a multi-dimensional array by a given key?
Timothy Boyden
tboyden at supercoups.com
Mon May 7 11:30:09 EDT 2007
Hi All,
I have a multi-dimensional array such as:
$franchises['SCID1'] = SCNYC
$franchises['SCID1']['BusinessName'] = SuperCoups of NY City
$franchises['SCID1']['DistanceFromCustomer'] = 20
$franchises['SCID2'] = SCBUFF
$franchises['SCID2']['BusinessName'] = SuperCoups of Buffalo
$franchises['SCID2']['DistanceFromCustomer'] = 10
How can I sort this array so the businesses are sorted by the
DistanceFromCustomer key?
Thanks for the help in advance,
Tim
---------------------------
Timothy Boyden
Network Administrator
tboyden at supercoups.com
SuperCoups(r)
350 Revolutionary Drive | E. Taunton, MA 02718
508-977-2034 | www.supercoups.com <http://www.supercoups.com/>
We Support Alex's Lemonade Stand Foundation,
"Fighting Childhood Cancer One Cup At A Time"
Donations Accepted at: www.firstgiving.com/SuperCoups
---------------------------
Local Coupons. Super Savings.(r)
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.nyphp.org/pipermail/talk/attachments/20070507/5248e1d9/attachment.html>
More information about the talk
mailing list