Getting the first part out of a string

From: Date: Fri, 04 May 2001 00:44:50 +0000
Subject: Getting the first part out of a string
Groups: php.general 
Request: Send a blank email to php-general+get-51354@lists.php.net to get a copy of this message
I know how to get last part of a string out of a string But how do I get the first part before the needle On the example below I just what domain $hostdomain= domain.com $host = substr (strrchr ($hostdomain, "."), 1); echo $host; com

« previous php.general (#51354) next »