Re: split string value again
| From: | elias | Date: | Thu, 29 Mar 2001 21:06:19 +0000 |
| Subject: | Re: split string value again | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-46063@lists.php.net to get a copy of this message | ||
try this snippet:
<?
if (ereg("[^@]+\$", "test@acme.foo.bar", $result))
{
$domain = $result[0];
echo $domain;
}
?>
""Jacky"" <jacky@activelifestyle.com> wrote in message
news:009301c0b8a2$e856f6c0$6400a8c0@activelifestyle.com...
Hi again
have to try again after I have not recieved any advice, I have a vairable
that stores email address value. I need to break it so that I will only get
the dmain name bit to store in another variable so that I can redirect user
to that domain, like if user email is test@foo.com. then I would like to
break that and take only foo.com bit to use for navigation.
How can I do that?
Jack
jacky@activelifestyle.com
"There is nothing more rewarding than reaching the goal you set for
yourself"