Bug #1561: str_replace not replacing when string @ end of string
| From: | sander at pilon dot com | Date: | Thu, 17 Jun 1999 18:38:32 +0000 |
| Subject: | Bug #1561: str_replace not replacing when string @ end of string | ||
| Groups: | php.dev | ||
| Request: | Send a blank email to php-dev+get-7059@lists.php.net to get a copy of this message | ||
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.)