Help with String Manipulation

From: Date: Mon, 26 Apr 2004 17:56:17 +0000
Subject: Help with String Manipulation
Groups: php.general 
Request: Send a blank email to php-general+get-184683@lists.php.net to get a copy of this message
I've never been much good at regex, but it seems there must be a simple way to achieve the following: I have a url that i need to get the 'host' part from for use in email. This almost works: <?php $host=parse_url($base_url); $emailaddy="noreply@".$host['host']; Unfortunately it produces: noreply@www.example.com So, what's the best way to make sure i got ONLY the host part? Many thanks... -- Nick W

« previous php.general (#184683) next »