Re: bug in str_replace() ?
| From: | Henrik Hansen | Date: | Sun, 21 Oct 2001 15:30:40 +0000 |
| Subject: | Re: bug in str_replace() ? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-71738@lists.php.net to get a copy of this message | ||
martin@humany.com (Martin Lindhe) wrote:
> Bug in str_replace(), PHP 4.0.6
>
> $text = "hello world";
> $out = str_replace(" "," ",$text);
> echo $out;
>
> Expected output:
> "hello world"
>
> Actual output:
> "hello world"
>
> Of course, this is what happens if str_replace() does replacements on input,
> but not on the soon-to-be output it is working on. Is this to be expected,
> or would it be ok to modify the functionality of str_replace()?
you should put it in a loop or something to get what you want.
--
Henrik Hansen