The easy way...

$domain = "http://www.foo.com";;
$domain = explode('.', $domain);
$foo = $domain['1'];



-----Original Message-----
From: Dave Carrera [mailto:[EMAIL PROTECTED] 
Sent: Thursday, April 01, 2004 1:30 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Domain Name ?

Hi List,

I asked this a while back but have lost the replies :-(

$domain = "http://www.foo.com";;

I want to strip our every thing and be left with only "foo" to use in my
function.

I think its multiple str_replace but have forgotten how to do it.

Thank you in advance for any help

Dave C

---
Outgoing mail is certified Virus Free.
Checked by AVG anti-virus system (http://www.grisoft.com).
Version: 6.0.645 / Virus Database: 413 - Release Date: 28/03/2004
 

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to