php 5.3 gives an error
Warning: preg_match() [function.preg-match]: Unknown modifier '='
when i test this is php 5.2, i have no problem
i know that ereg is deprecated so i switched it to preg_match for 5.3
but in 5.3 i get an errorCode:$local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if(!ereg("^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$", $local_array[$i])){ return false; } }
any ideas?Code:$local_array = explode(".", $email_array[0]); for ($i = 0; $i < sizeof($local_array); $i++) { if(!preg_match("/^(([A-Za-z0-9!#$%&'*+/=?^_`{|}~-][A-Za-z0-9!#$%&'*+/=?^_`{|}~\.-]{0,63})|(\"[^(\\|\")]{0,62}\"))$/", $local_array[$i])){ return false; } }



Reply With Quote



Bookmarks