note 52141 added to function.array-intersect

From: Date: Fri, 22 Apr 2005 03:04:39 +0000
Subject: note 52141 added to function.array-intersect
Groups: php.notes 
Request: Send a blank email to php-notes+get-88381@lists.php.net to get a copy of this message
Just a handy tip. If you want to produce an array from two seperate arrays on their intersects, here you go: <? $a = array("branches","E_SHOP"); $b = array("E_SHOP","Webdirector_1_0"); print join("/",array_merge(array_diff($a, $b), array_intersect($a, $b), array_diff($b, $a))); ?> Gives you: /branches/E_SHOP/Webdirectory_1_0 ---- Manual Page -- http://www.php.net/manual/en/function.array-intersect.php Edit -- http://master.php.net/manage/user-notes.php?action=edit+52141 Delete: added to the manual -- http://master.php.net/manage/user-notes.php?action=delete+52141&report=yes&reason=added+to+the+manual Delete: bad code -- http://master.php.net/manage/user-notes.php?action=delete+52141&report=yes&reason=bad+code Delete: spam -- http://master.php.net/manage/user-notes.php?action=delete+52141&report=yes&reason=spam Delete: useless -- http://master.php.net/manage/user-notes.php?action=delete+52141&report=yes&reason=useless Delete: other reasons -- http://master.php.net/manage/user-notes.php?action=delete+52141&report=yes Reject -- http://master.php.net/manage/user-notes.php?action=reject+52141&report=yes Search -- http://master.php.net/manage/user-notes.php

« previous php.notes (#88381) next »