note 24099 added to function.array-diff
| From: | drNOSPAMtdiggersSPAMNO at hotmail dot com | Date: | Tue, 06 Aug 2002 17:10:26 +0000 |
| Subject: | note 24099 added to function.array-diff | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-34407@lists.php.net to get a copy of this message | ||
array_diff does not have buggy behavior as described above. The problem stems from calling
array_diff() each time in the loop, therefore regererating a new array with an index always at the
beginning EVERY time, so each will always pick the first entry. This is not buggy, but in fact what
you've told the program to do :) The solution is not as much a solution, but properly
instructing the program what to do!
Cheers!
TheoDiggers
--
http://www.php.net/manual/en/function.array-diff.php
http://master.php.net/manage/user-notes.php?action=edit+24099
http://master.php.net/manage/user-notes.php?action=delete+24099
http://master.php.net/manage/user-notes.php?action=reject+24099