<?php
$email = 'admin@jb51.net';
$domain = strstr($email, '@');
echo $domain; // prints @jb51.net
$user = strstr($email, '@', true); // As of PHP 5.3.0
echo $user; // prints admin
?>
$email = 'admin@jb51.net';
$domain = strstr($email, '@');
echo $domain; // prints @jb51.net
$user = strstr($email, '@', true); // As of PHP 5.3.0
echo $user; // prints admin
?>