How to extract the domain name from an email address with PHP:

$email = "[email protected]";

// make sure we've got a valid email
if( filter_var( $email, FILTER_VALIDATE_EMAIL ) ) {
    // split on @ and return last value of array (the domain)
    $domain = array_pop(explode('@', $email));

    // output domain
    echo $domain
}