sorting multi-array
| From: | Jiří Němec | Date: | Thu, 24 Jul 2003 14:16:38 +0000 |
| Subject: | sorting multi-array | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-156647@lists.php.net to get a copy of this message | ||
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