note 85068 deleted from function.array-intersect by nicos

From: Date: Thu, 14 Aug 2008 00:52:06 +0000
Subject: note 85068 deleted from function.array-intersect by nicos
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-143473@lists.php.net to get a copy of this message
Note Submitter: Esfandiar -- e.bandari at gmail dot com Reason: 1 ---- Php should have this, but I couldn't find a function that would find and return the index of value(s) in an array. So here is: function arrayFindValues ($array2search, $values) { // array intersect needs $values to be an array $tmp = is_array($values) ? $values : array($values); return array_intersect ($array2search, $tmp); }

« previous php.notes (#143473) next »