FILTER_VALIDATE_EMAIL

Check whether the email is valid or not

Example
======

<?php
if(filter_var(“info@phpcodez.com”, FILTER_VALIDATE_EMAIL)) {
echo “Valid Email”;
}else {
echo “Invalid Email”;
}
?>

Output
=====

Valid Email

Share

Leave a Reply

Your email address will not be published. Required fields are marked *