note 92900 added to function.array-intersect
| From: | ShawnPyle at osu1 dot php dot net | Date: | Thu, 13 Aug 2009 16:29:05 +0000 |
| Subject: | note 92900 added to function.array-intersect | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-159444@lists.php.net to get a copy of this message | ||
array_intersect handles duplicate items in arrays differently. If there are duplicates in the first
array, all matching duplicates will be returned. If there are duplicates in any of the subsequent
arrays they will not be returned.
<?php
array_intersect(array(1,2,2),array(1,2,3)); //=> array(1,2,2)
array_intersect(array(1,2,3),array(1,2,2)); //=> array(1,2)
?>
----
Server IP: 209.41.74.194
Probable Submitter: 173.10.39.249
----
Manual Page -- http://www.php.net/manual/en/function.array-intersect.php
Edit -- https://master.php.net/note/edit/92900
Del: integrated -- https://master.php.net/note/delete/92900/integrated
Del: useless -- https://master.php.net/note/delete/92900/useless
Del: bad code -- https://master.php.net/note/delete/92900/bad+code
Del: spam -- https://master.php.net/note/delete/92900/spam
Del: non-english -- https://master.php.net/note/delete/92900/non-english
Del: in docs -- https://master.php.net/note/delete/92900/in+docs
Del: other reasons-- https://master.php.net/note/delete/92900
Reject -- https://master.php.net/note/reject/92900
Search -- https://master.php.net/manage/user-notes.php