Daleeburg Posted March 22, 2007 Share Posted March 22, 2007 So here is what i am attempting to do, is this possible and if so, how? I would like my user to type in their email in the registration information and then have the php split the email address at the @ so it would look like this [email protected] $email1 = user $email2 = provider.com also how would i reassemble it ? $email = $email1.'@'.$email2 ? thanks ~d Link to comment https://forums.phpfreaks.com/topic/43842-solved-splitting-up-posted-variables/ Share on other sites More sharing options...
Orio Posted March 22, 2007 Share Posted March 22, 2007 Use explode(): <?php list($email1, $email2) = explode("@", $full_email); echo "First part- ".$email1.", Part 2- ".$email2."<br>"; $reassemble = $email1.'@'.$email2; //You were right echo $reassemble; ?> Orio. Link to comment https://forums.phpfreaks.com/topic/43842-solved-splitting-up-posted-variables/#findComment-212830 Share on other sites More sharing options...
Daleeburg Posted March 22, 2007 Author Share Posted March 22, 2007 thank you very much, seems to work ~d Link to comment https://forums.phpfreaks.com/topic/43842-solved-splitting-up-posted-variables/#findComment-212833 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.