| Below code will helps you to split username and hostname in two parts. Here in below example we use explode keyword to split emailaddress
< ?php
$TestEmailAddress = "questions@getproductprice.com";
$TestArray = explode("@",$TestEmailAddress);
print_r($TestArray);
?>
And we get below output from above code
[0]=questions
[1]=getproductprice.com | | |