Checking for valid email address in PHP
function check_email_address($emailadd) {
// First, we check that there's one @ symbol, and that the lengths are right
if (!ereg("^[^@]{1,64}@[^@]{1,255}$", $emailadd)) {
// Email invalid because wrong number of characters in one section, or wrong number of @ symbols.
return false;
}
// Split it into sections to make life easier
$email_array = explode("@", $emailadd);
$local_array = explode(".", $email_array[0]);
for ($i = [...]
