Sorting a 2 dimentional ARRAY

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
mbaroz
Forum Commoner
Posts: 29
Joined: Sun Feb 05, 2006 10:10 am

Sorting a 2 dimentional ARRAY

Post by mbaroz »

Hi There
I have results stored in a 2 dimension array eg:

Code: Select all

$MYARRY[Name][0]="mosuje";
$MYARRAY[UserID][0]=1;
$MYARRAY[Name][1]="avi";
$MYARRAY[UserID][1]=2;


I would like to sort the array while preserving key correlation by on the string key (Name) How can i implement it ?

Tnanks
moshe
User avatar
jayshields
DevNet Resident
Posts: 1912
Joined: Mon Aug 22, 2005 12:11 pm
Location: Leeds/Manchester, England

Post by jayshields »

Searched this forum, Google, php.net? Anything? There's loads on this.
Post Reply