Re[2]: [PHP] parsing domains
| From: | Tom Rogers | Date: | Thu, 28 Aug 2003 09:31:01 +0000 |
| Subject: | Re[2]: [PHP] parsing domains | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-161019@lists.php.net to get a copy of this message | ||
Hi,
Thursday, August 28, 2003, 7:02:44 PM, you wrote:
>> str_replace('/www.','/',$parseddomain);
MJ> wont this just make me get a .com when I use my thing to parse the domain?
MJ> --
MJ> _______________________________________________
MJ> Get your free Verizonmail at www.verizonmail.com
No it should just get rid of the www so your left with domain.com
and now that I see what you are after it should have been:
$domain = str_replace('www.','',$domain);
and if you need the dot now add it in
$parseddomain = '.'.$domain;
No need for the preg_replace at all
--
regards,
Tom