Source Code:
(back to article)
<?php $email = "test@example.com"; if (filter_var($email, FILTER_VALIDATE_EMAIL)) { echo "This is a valid email address."; } else { echo "This is not a valid email address."; } ?>
Result:
Report an issue