note 74534 added to function.array-merge
| From: | kurtubba at gmail dot com | Date: | Mon, 16 Apr 2007 11:56:35 +0000 |
| Subject: | note 74534 added to function.array-merge | ||
| Groups: | php.notes | ||
| Request: | Send a blank email to php-notes+get-125438@lists.php.net to get a copy of this message | ||
So we need to merge 2 arrays without having any duplicates and the result array should be numircally
arranged?
<?php
function array_merge_nodup($arr1, $arr2){
return array_values(array_unique(array_merge($arr1, $arr2)));
}
?>
----
Server IP: 69.147.83.197
Probable Submitter: 217.54.2.132
----
Manual Page -- http://www.php.net/manual/en/function.array-merge.php
Edit -- https://master.php.net/note/edit/74534
Del: integrated -- https://master.php.net/note/delete/74534/integrated
Del: useless -- https://master.php.net/note/delete/74534/useless
Del: bad code -- https://master.php.net/note/delete/74534/bad+code
Del: spam -- https://master.php.net/note/delete/74534/spam
Del: non-english -- https://master.php.net/note/delete/74534/non-english
Del: in docs -- https://master.php.net/note/delete/74534/in+docs
Del: other reasons-- https://master.php.net/note/delete/74534
Reject -- https://master.php.net/note/reject/74534
Search -- https://master.php.net/manage/user-notes.php