Skip to content

Check for valid email address in PHP

Last updated on October 19, 2014

Below is the simple PHP function to check for valid email address.

    function is_valid_email($email) {
     if(preg_match("/[a-zA-Z0-9_-.+]+@[a-zA-Z0-9-]+.[a-zA-Z]+/", $email) > 0)
        return true;
     else
       return false;
    }
0 0 votes
Article Rating
Subscribe
Notify of
guest

0 Comments
Most Voted
Newest Oldest
Inline Feedbacks
View all comments