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