#42889 [Opn->Csd]: typo on php.net/function.array-multisort

From: Date: Wed, 21 Nov 2007 15:01:34 +0000
Subject: #42889 [Opn->Csd]: typo on php.net/function.array-multisort
References: 1  Groups: php.doc.bugs 
Request: Send a blank email to doc-bugs+get-233@lists.php.net to get a copy of this message
ID: 42889 Updated by: vrana@php.net Reported By: daniel dot land at gmail dot com -Status: Open +Status: Closed Bug Type: Documentation problem Operating System: XP PHP Version: Irrelevant New Comment: This bug has been fixed in the documentation's XML sources. Since the online and downloadable versions of the documentation need some time to get updated, we would like to ask you to be a bit patient. Thank you for the report, and for helping us make our documentation better. Example changed to: <?php $ar1 = array(10, 100, 100, 0); $ar2 = array(1, 3, 2, 4); array_multisort($ar1, $ar2); ?> Previous Comments: ------------------------------------------------------------------------ [2007-10-08 13:13:35] bjori@php.net That example is highly confusing. Adding a note on what really is going on there would be really useful. ------------------------------------------------------------------------ [2007-10-08 12:49:11] rquadling@php.net The example is correct. You cannot consider the second array as separate from the first array. This function is emulating the sorting of columns in a table, so the first column has a higher precedence in controlling the results. ------------------------------------------------------------------------ [2007-10-08 12:43:31] daniel dot land at gmail dot com Description: ------------ The second example on php.net/function.array-multisort says: 'The second will contain 1, 3, "2", 2, 1 (sorted as numbers, in descending order).' Maybe this is a typo because 1,3,2,2,1 is not in descending order, right? Reproduce code: --------------- N/A Expected result: ---------------- The first number in the sequence should be 3 or higher. Actual result: -------------- The first number in the sequence is 1. ------------------------------------------------------------------------ -- Edit this bug report at http://bugs.php.net/?id=42889&edit=1

« previous php.doc.bugs (#233) next »