Re: [PHP] Getting the first part out of a string

2001-05-04 Thread Gyozo Papp
= array('www', 'behsci', 'sote', 'hu'); - Original Message - From: "Richard Kurth" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: 2001. május 4. 02:44 Subject: [PHP] Getting the first part out of a string > I know how to

Re: [PHP] Getting the first part out of a string

2001-05-04 Thread Hrishi
Richard Kurth wrote: > 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); strrchr (two r) finds the first occur

[PHP] Getting the first part out of a string

2001-05-03 Thread Richard Kurth
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 -- PHP General Mailing List (http://www.php.net/) To