Re: strstr

From: Date: Fri, 27 Feb 2004 14:03:24 +0000
Subject: Re: strstr
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-179003@lists.php.net to get a copy of this message
Jakes wrote:
I got this out the manual: <?php $email = 'user@example.com'; $domain = strstr($email, '@'); print $domain; // prints @example.com ?> how do I get the "user" ranther than "@example.com"Thanks
$bits = explode('@',$email); echo $bits[0]; http://www.php.net/explode

« previous php.general (#179003) next »