note 73660 deleted from function.array-flip by danbrown
| From: | danbrown@php.net | Date: | Fri, 14 May 2010 15:03:50 +0000 |
| Subject: | note 73660 deleted from function.array-flip by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-169249@lists.php.net to get a copy of this message | ||
Note Submitter: http://www.callum-macdonald.com/
----
It might seem obvious, but if you want to remove duplicates from an array, you can use array_flip()
twice:
$arr = array_flip(array_flip($arr));