Sorting multidimensional arrays..

From: Date: Thu, 30 Jan 2003 19:29:27 +0000
Subject: Sorting multidimensional arrays..
Groups: php.general 
Request: Send a blank email to php-general+get-133688@lists.php.net to get a copy of this message
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

« previous php.general (#133688) next »