How to get what's between @ and .com in email?
<p>If I have an email myemail@gmail.com, how to store in variable $name only what's between @ and .com? For myemail@gmail.com in variable $name would be 'gmail', and for myemail@yahoo.com, in variable $name would be 'yahoo'.
EDIT: Maybe it would be better to select everything between @ and .I searched for answer before I posted a question here, but I couldn't find an answer.</p>
