I have a problem managing a string ..
I have
$email = "test@foo.bar";
and I need to echo only "test" (excluding @foo.bar ) .
Any idea to do that :roll: ? Thank you
Moderators: macek, egami, gesf

Jay wrote:A variety of methods are open to you. If you just want the user name from an email you can use:
list($user,$domain) = explode("@",$email);
$user will now be "test"

Users browsing this forum: No registered users and 1 guest