note 89355 rejected from function.array-multisort by thiago

From: Date: Wed, 04 Mar 2009 14:59:48 +0000
Subject: note 89355 rejected from function.array-multisort by thiago
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-151457@lists.php.net to get a copy of this message
Note Submitter: xcojack at gmail dot com ---- You have one small bug in manual, this: <?php $tbl = array ( array ("10", 100, 100, "a"), array (1, 3, "2", 1) ); array_multisort ($tbl[0], SORT_ASC, SORT_STRING, $tbl[1], SORT_NUMERIC, SORT_DESC); var_dump($tbl); ?> will not show what You show, I mean: array(2) { [0]=> array(5) { [0]=> string(2) "10" [1]=> int(100) [2]=> int(100) [3]=> int(11) [4]=> string(1) "a" } [1]=> array(5) { [0]=> int(1) [1]=> int(3) [2]=> string(1) "2" [3]=> int(2) [4]=> int(1) } } but: array(2) { [0]=> array(4) { [0]=> string(2) "10" [1]=> int(100) [2]=> int(100) [3]=> string(1) "a" } [1]=> array(4) { [0]=> int(1) [1]=> int(3) [2]=> string(1) "2" [3]=> int(1) } } It's litle bug, but it's. Best regards.

« previous php.notes (#151457) next »