I'm having a little trouble sorting mult-dimensional arrays by key...

I looked-up the manual and found out that array_multisort() thing... but I 
don't think it does what I want... or I don't understand it...

I have an array like this...

$categories=array();
$categories[0]["id"]=1;
$categories[0]["name"]="Xyz";
$categories[0]["id"]=7;
$categories[0]["name"]="Lala";
$categories[0]["id"]=2;
$categories[0]["name"]="Lele";

I want it sorted by "name"... the way I'm doing it  right now is by using 
an auxiliar array that gets all the names, sorts them, and then build a new 
array based on that...

is a better way?

p.s: meu novo email  [EMAIL PROTECTED]
____________________________
. Christian Dechery (lemming)
. http://www.tanamesa.com.br
. Gaita-L Owner / Web Developer


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to