Unique Array Values
| From: | Andreas Pour | Date: | Wed, 26 Apr 2000 17:45:02 +0000 |
| Subject: | Unique Array Values | ||
| Groups: | php.version4 | ||
| Request: | Send a blank email to php-version4+get-14075@lists.php.net to get a copy of this message | ||
Hi,
Well, there are many undocumented functions in PHP4 -- maybe the one I'm
looking for is lurking somewhere. I would like to retrieve all the
unique values in an array. For example,
array_values(array("cat", "dog", "mouse", "dog"))
would return
array("cat", "dog", "mouse")
If such a function does not exist, perhaps a flag to the current
array_values for "unique = true" is possible?
Ciao,
Andreas