Jump to content

[SOLVED] Keep entire e-mail address from displaying


jhunter626

Recommended Posts

I tried to search through the forums and I guess I can't get the right search pattern to find what I am looking for so now I am posting it here. I am sure this question has been answered I just can't find it.

 

Of course I have a database I am pulling info from. When I pull the persons e-mail address out I only want to display everything before the "@" sign.

 

This way when another user sees who posted something they will not be able to get the person's (poster) entire e-mail address.

 

So if in the database the poster's email is "[email protected]", I only want "someone" to be displayed.

 

I know this has to be a fairly easy task for many of you, I just can't find the answer.

 

Thanks in Advance

J.

Go Figure...

As soon as I posted this I found what I needed to solve this.

 

In case anyone is interested here is what I did:

 

$email = '[email protected]';

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

echo $email_parts[0]; 

 

 

Hope this helps someone else in the future

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.