Jump to content

Strip part of String Variable


Recommended Posts

Hey there.

Thinking this should be an easy one but I can only seem to find info on the string replace function.

What I'm trying to do is strip everything after the @ from an email variable.

 

So for example $mail variable comes in as

[email protected]

 

How would I strip the variable to only contain me and remove the @gmail.com

 

I'll keep searching for the answer myself but if anyone can throw me a bone it's be appreciated.

 

Cheers

Link to comment
https://forums.phpfreaks.com/topic/236266-strip-part-of-string-variable/
Share on other sites

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.