Re: Splitting a string

From: Date: Thu, 13 Mar 2003 14:50:12 +0000
Subject: Re: Splitting a string
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-139509@lists.php.net to get a copy of this message
Then split the variable where there is a "S". The problem showed up when there is another "S" in the field. I only want to split the first "S" at the beginning of the field. Isn't there an additional value to add to the split
$line = 'S12345'; if ($line[0] == 'S') { /* do stuff */ }
$str = "S12345"; $str1 = ltrim($str,"S");

« previous php.general (#139509) next »