Source Code:
(back to article)
<?php $email = "user@example.com"; if (!filter_var($email, FILTER_VALIDATE_EMAIL)) { echo "Invalid email format"; } else { echo "Valid email format"; } ?>
Result:
Report an issue