note 70754 deleted from function.in-array by danbrown

From: Date: Mon, 08 Jun 2009 21:44:03 +0000
Subject: note 70754 deleted from function.in-array by danbrown
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-156512@lists.php.net to get a copy of this message
Note Submitter: mattsch at gmail dot com ---- I'm not sure why you would do a loop for a function that needs to be fast. There's an easier way: function preg_array($strPattern, $arrInput){ $arrReturn = preg_grep($strPattern, $arrInput); return (count($arrReturn)) ? true : false; }

« previous php.notes (#156512) next »