- little improvement in in_array_nocase()

release-0.6
alecpl 16 years ago
parent 7f63946719
commit ba80566b1e

@ -209,8 +209,9 @@ function array2js($arr, $type='')
*/ */
function in_array_nocase($needle, $haystack) function in_array_nocase($needle, $haystack)
{ {
$needle = rc_strtolower($needle);
foreach ($haystack as $value) foreach ($haystack as $value)
if (rc_strtolower($needle)===rc_strtolower($value)) if ($needle===rc_strtolower($value))
return true; return true;
return false; return false;

Loading…
Cancel
Save