if 'EXTENSION' is unique then you can make life a lot easier by making that the key of the root array (this is a heirarchy of arrays).
Tim Ward http://www.chessish.com mailto:[EMAIL PROTECTED] ----- Original Message ----- From: Chad Day <[EMAIL PROTECTED]> To: php general <[EMAIL PROTECTED]> Sent: Thursday, January 30, 2003 7:29 PM Subject: [PHP] Sorting multidimensional arrays.. > I'm struggling with array_multisort, was hoping someone could give me some > help. > > I have a multidim array, such as: > > $myarray[0][FIRSTNAME] = JOE > $myarray[1][FIRSTNAME] = TIM > $myarray[2][FIRSTNAME] = BOB > > $myarray[0][LASTNAME] = SMITH > $myarray[1][LASTNAME] = BROWN > $myarray[2][LASTNAME] = JONES > > $myarray[0][EXTENSION] = 2000 > $myarray[1][EXTENSION] = 4000 > $myarray[2][EXTENSION] = 1000 > > I was trying array_multisort($myarray[EXTENSION], SORT_NUMERIC, SORT_DESC), > but nothing seems to be happening to the array. If anyone has any clues or > can point me in the right direction, I would appreciate it. > > Thanks, > Chad > > > -- > PHP General Mailing List (http://www.php.net/) > To unsubscribe, visit: http://www.php.net/unsub.php > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php