note 10147 deleted from function.array-diff by irc-html
| From: | irc-html@php.net | Date: | Sat, 19 Jan 2002 20:58:00 +0000 |
| Subject: | note 10147 deleted from function.array-diff by irc-html | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-25446@lists.php.net to get a copy of this message | ||
To umer@ezboard.com, the same problem ocurrs with array_unique. Try this solution provided by
matthew_dean@hotmail.com. Use
array_values(array_unique($myArray));
or you can also use the one suggested by burno@33-24-36.com (I haven't tested it myself).
usort($myArray,"return -1");
I think this problem is present on all array functions, but will only be noticed with numerically
indexed arrays.