Created
October 4, 2013 21:17
-
-
Save dflima/6832922 to your computer and use it in GitHub Desktop.
Email validation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
<?php | |
function validate_email($email) { | |
if (filter_var($email, FILTER_VALIDATE_EMAIL)) | |
return true; | |
return false; | |
} | |
var_dump(validate_email("me@example.com")); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment