RE: [PHP] string replace problem!!

From: Date: Fri, 28 Mar 2003 14:25:15 +0000
Subject: RE: [PHP] string replace problem!!
Groups: php.general 
Request: Send a blank email to php-general+get-141444@lists.php.net to get a copy of this message
Hello Rich, Thanx for the reply. But i should have cheked my code better. The piece of code was stuck in a for loop that's why the ',' was removed from every slideimages[$x]. $string = substr($string,1); works great though..:) grtz, Thijs -----Oorspronkelijk bericht----- Van: Rich Gray [mailto:rich@f1central.net] Verzonden: vrijdag 28 maart 2003 12:39 Aan: Thijs Lensselink; php-general@lists.php.net Onderwerp: RE: [PHP] string replace problem!! > 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

« previous php.general (#141444) next »