Skip to content

Instantly share code, notes, and snippets.

@parzibyte
Created March 8, 2019 16:32
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save parzibyte/3a1157a67c65190752bae83b844a6e63 to your computer and use it in GitHub Desktop.
Save parzibyte/3a1157a67c65190752bae83b844a6e63 to your computer and use it in GitHub Desktop.
#<?php
$correo = "contacto@parzibyte.me";
// filter_var regresa los datos filtrados
$correo = filter_var($correo, FILTER_VALIDATE_EMAIL);
// regresa false si no son válidos
if ($correo !== false) {
echo "La dirección $correo es válida :)";
} else {
echo "La dirección NO es válida";
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment