RE: [PHP] string replace problem!!
| From: | Rich Gray | Date: | Fri, 28 Mar 2003 11:38:55 +0000 |
| Subject: | RE: [PHP] string replace problem!! | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-141419@lists.php.net to get a copy of this message | ||
> Good day ,
>
> I have the following string.
> ,slideimages[0],slideimages[1],slideimages[2]
> Wich starts with a ','. No my problem is i want to strip
> this first and only the first ','.
>
> i've tried
> $string = ",slideimages[0],slideimages[1],slideimages[2]";
> $string = preg_replace('/^./','',$string,1);
>
> wich results in slideimages[0]slideimages[1]slideimages[2]
> Can somebody help me out here??
>
> thnx
> Thijs
$string = substr($string,1);
Rich