Re: sorting multi-array

From: Date: Thu, 24 Jul 2003 14:52:21 +0000
Subject: Re: sorting multi-array
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-156657@lists.php.net to get a copy of this message
hi, try usort(); ciao SVEN JiøîÆèî eË wrote: > hello, > > i have got a problem, tehere is an array: > > $x = array( > array(15,55,array(1,2,3),3,5,array(1,2,5)), > array(25,55,array(1,2,3),3,5,array(1,2,5)), > array(5,55,array(1,2,3),3,5,array(1,2,5)) > ); > > and I need to sort this arraybz first item of sub-arrays (x[0][0], > $x[1][0], $x[2][0]). this is the correct result: > > $x = array( > array(5,55,array(1,2,3),3,5,array(1,2,5)), > array(15,55,array(1,2,3),3,5,array(1,2,5)), > array(25,55,array(1,2,3),3,5,array(1,2,5)) > ); > > some idea how sort this multidimensional array? thank you for your > reply. > > jiøí nìmec, ICQ: 114651500 > www.menea.cz - www stránky a aplikace

« previous php.general (#156657) next »