note 32098 deleted from function.preg-grep by alindeman

From: Date: Fri, 16 May 2003 20:44:09 +0000
Subject: note 32098 deleted from function.preg-grep by alindeman
References: 1  Groups: php.notes 
Request: Send a blank email to php-notes+get-48115@lists.php.net to get a copy of this message
Note Submitter: dfx@dfx.at i think this is the "proper" emulation of this function. function preg_grep($pattern, $array) { $ret = array(); foreach($array as $k => $v) { if (preg_match($pattern, $v)) $ret[$k] = $v; } return $ret; }

« previous php.notes (#48115) next »