Skip to content

Instantly share code, notes, and snippets.

@ixzy24
Created June 3, 2012 13:32
Show Gist options
  • Save ixzy24/2863518 to your computer and use it in GitHub Desktop.
Save ixzy24/2863518 to your computer and use it in GitHub Desktop.
email validation in PHP
<?php
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;
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment