Return to Snippet

Revision: 31963
at September 16, 2010 16:38 by Calvista


Initial Code
function cleanAddress($address)
{
    return filter_var(strtolower(trim(preg_replace('/\\s+/', '', $address))), FILTER_SANITIZE_EMAIL);
}

Initial URL


Initial Description
Requires PHP 5.2 with filter_var()

Initial Title
Clean up and normalize email address

Initial Tags
email, php, filter

Initial Language
PHP