note 28463 added to function.in-array

From: Date: Tue, 14 Jan 2003 08:21:49 +0000
Subject: note 28463 added to function.in-array
Groups: php.notes 
Request: Send a blank email to php-notes+get-42105@lists.php.net to get a copy of this message
oops, forgot the 'i' switch on the case-insensitive version of in_array. It should read: function is_in_array($str, $array) { return preg_grep('/^' . preg_quote($str, '/') . '$/i', $array); } -- http://www.php.net/manual/en/function.in-array.php http://master.php.net/manage/user-notes.php?action=edit+28463 http://master.php.net/manage/user-notes.php?action=delete+28463 http://master.php.net/manage/user-notes.php?action=reject+28463

« previous php.notes (#42105) next »