Get your own website Result Size: 625 x 565
x
 
<!DOCTYPE html>
<html>
<body>
<?php
$email = "john.doe@example.com";
// Remove all 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");
}
?>
</body>
<!-- Mirrored from www.w3schools.com/php/phptryit.asp?filename=tryphp_filter6 by HTTrack Website Copier/3.x [XR&CO'2014], Wed, 21 Dec 2022 16:49:35 GMT -->
</html>
john.doe@example.com is a valid email address