Source Code:
(back to article)
<?php $email = "w3dcs@example.com"; // Removing all the illegal characters from email $email = filter_var($email, FILTER_SANITIZE_EMAIL); // Validate e-mail if (!filter_var($email, FILTER_VALIDATE_EMAIL) === false) { echo "$email is a valid email address"; } else { echo "$email is not a valid email address"; } ?>
Result:
Report an issue