Bug #10382 Updated: array_multisort() doesn't work as advertised
| From: | andrei@php.net | Date: | Fri, 20 Apr 2001 17:16:04 +0000 |
| Subject: | Bug #10382 Updated: array_multisort() doesn't work as advertised | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-52073@lists.php.net to get a copy of this message | ||
ID: 10382
Updated by: andrei
Reported By: mnino@insightc.om
Old-Status: Open
Status: Closed
Bug Type: Documentation problem
PHP Version: 4.0.4pl1
Assigned To:
Comments:
I cut & pasted your code and ran it against latest CVS version and it works.
Previous Comments:
---------------------------------------------------------------------------
[2001-04-18 13:57:41] mnino@insightc.om
Sorry, I submitted this to the 'add notes' for the online manual thinking that was where I
might get information.
What I did is cut-&-pasted the code from documentation for the function array_multisort() into
a brand new PHP script and added some print_r() calls. The function array_multisort() doesn't
work as adverstised. :] It generates an error: Warning: Argument 3 to array_multisort() is expected
to be an array in array_multisort.php on line 9
Here is the PHP file array_multisort.php:
<pre>
<?php
$ar = array (array ("10", 100, 100, "a"), array (1, 3, "2", 1));
print_r($ar);
array_multisort ($ar[0], SORT_ASC, SORT_STRING,
$ar[1], SORT_NUMERIC, SORT_DESC);
print_r($ar);
?>
</pre>
Can anyone assist?
---------------------------------------------------------------------------
ATTENTION! Do NOT reply to this email!
To reply, use the web interface found at http://bugs.php.net/?id=10382&edit=2