Here’s the absolute easiest way you can validate an email address using PHP. This tiny function takes advantage of the filter_var() function in PHP.

That said, you really don’t even need the function wrapper if you can remember filter_var() and the appropriate constant. Just remember that the return value will be┬áthe filtered string or… Read More