note 108557 deleted from function.array-intersect by danbrown
| From: | danbrown@php.net | Date: | Thu, 10 May 2012 16:47:00 +0000 |
| Subject: | note 108557 deleted from function.array-intersect by danbrown | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-187589@lists.php.net to get a copy of this message | ||
Note Submitter: laurent at knc dot nc
----
@dml the function works properly. Just read its usage, especially the "all the values of
array1".
So if you have an array with duplicates just do:
<?php
$array1 = array_unique($array1);
$result = array_intersect($array1, $array2);
?>