Re: Bug #1561: str_replace not replacing when string @ end of string

From: Date: Thu, 17 Jun 1999 19:40:27 +0000
Subject: Re: Bug #1561: str_replace not replacing when string @ end of string
References: 1  Groups: php.dev 
Request: Send a blank email to php-dev+get-7060@lists.php.net to get a copy of this message
This is fixed in 3.0.8. Jim On Jun 17, sander@pilon.com wrote: > From: sander@pilon.com > Operating system: Linux > PHP version: 3.0.7 > PHP Bug Type: Misbehaving function > Bug description: str_replace not replacing when string @ end of string > > In a program ... > > This works: > $url = str_replace('$id',$id,$url." "); > > But this doesnt: (It doesnt replace '$id' at all.) > $url = str_replace('$id',$id,$url); > > (It should work.) > > $url is some string coming from a MySQL database, with '$id' in it (as text). This > time at the end. If I assign the url manually it replaces fine, just not when it comes from a SQL > datbase AND it's at the end of string. (So it's pretty hard to reproduce in just text.) > > > > > -- > PHP Development Mailing List (http://www.php.net/) > To unsubscribe, e-mail: php-dev-unsubscribe@lists.php.net > For additional commands, e-mail: php-dev-help@lists.php.net > To contact the list administrators, e-mail: php-list-admin@lists.php.net >

« previous php.dev (#7060) next »