note 45742 added to function.array-multisort
| From: | dawa at did-it dot com | Date: | Thu, 16 Sep 2004 20:59:03 +0000 |
| Subject: | note 45742 added to function.array-multisort | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-76845@lists.php.net to get a copy of this message | ||
There is a bug (I think ) in array_multisort ...EG
<code>
$a1 = Array("1", "2", "5", "4", "2");
$b = Array("c", "d", "e", "f", "a");
$a2 = $a1;
array_multisort($a1);
print_r($a1);
print_r($a2); //Prints 1 2 2 4 5 [This is wrong]
</code>
Do you guys have any insight?
----
Manual Page -- http://www.php.net/manual/en/function.array-multisort.php
Edit -- http://master.php.net/manage/user-notes.php?action=edit+45742
Delete -- http://master.php.net/manage/user-notes.php?action=delete+45742&report=yes
Reject -- http://master.php.net/manage/user-notes.php?action=reject+45742&report=yes
Search -- http://master.php.net/manage/user-notes.php