Jump to content

[SOLVED] Split an e-mail address


simonp

Recommended Posts

$arrEmail=explode('@',$email);

 

This would make an array called $arrEmail

$arrEmail[0] would be before the @

$arrEmail[1] would be everything after the @

 

EDIT:

 

Or...

 

You can do this as well if you don't want to use arrays...

list($string1,$string2)=explode('@',$email);

$string1 would be before the @

$string2 would be everything after the @

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.