note 52141 deleted from function.array-intersect by cmb

From: Date: Sun, 09 Feb 2020 08:28:29 +0000
Subject: note 52141 deleted from function.array-intersect by cmb
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-214066@lists.php.net to get a copy of this message
Note Submitter: drew at iws dot co dot nz ---- 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

« previous php.notes (#214066) next »