Re: script question

From: Date: Tue, 26 Sep 2000 02:14:24 +0000
Subject: Re: script question
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-17485@lists.php.net to get a copy of this message
On Sat, 23 Sep 2000, BrianSander wrote: > Greetings, > > I have a problem which will probably has a very simple solution, I'm > relatively new to programming in general. > > I'm attempting to write a php script which will split an email address > into its name and domain components. > > $email is passed from a webpage > > <?php > > $before_@ = (some regular expression)$email > $after_@ = (some regular expression)$email > > ?> > > > How would this be accomplished? > > Thanks. Explode looks like the tool: $stuff = explode("@",$email_Address); $username = $stuff[0]; $hostname = $stuff[1]; -- David Robley | WEBMASTER & Mail List Admin RESEARCH CENTRE FOR INJURY STUDIES | http://www.nisu.flinders.edu.au/ AusEinet | http://auseinet.flinders.edu.au/ Flinders University, ADELAIDE, SOUTH AUSTRALIA

« previous php.general (#17485) next »