Getting part of a string
| From: | Website4S at aol dot com | Date: | Sun, 21 Jan 2001 02:10:45 +0000 |
| Subject: | Getting part of a string | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-35869@lists.php.net to get a copy of this message | ||
Hi,
I have a form which users enter their email address, once submitted I need a
way to chop it up and put it in lowercase. So that if a user submits
Website4S@AoL.com I want PHP to throw out Website4S and then make the rest
lowercase so I would get @aol.com
I know how to get the string to lowercase by using
$Email1=strtolower($Email);
My problem is how to get $Email and chop off anything up to the @ and because
people may enter different email providors I have no idea how to get around
it. Anyone have a suggestion I would really appreciate it.
Ade