note 24099 deleted from function.array-diff by cmb
| From: | cmb@php.net | Date: | Tue, 05 Nov 2019 14:49:45 +0000 |
| Subject: | note 24099 deleted from function.array-diff by cmb | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-212945@lists.php.net to get a copy of this message | ||
Note Submitter: drNOSPAMtdiggersSPAMNO at hotmail dot com
----
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