Re: replace functions add \
| From: | Jason Stechschulte | Date: | Tue, 01 May 2001 13:12:26 +0000 |
| Subject: | Re: replace functions add \ | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-50972@lists.php.net to get a copy of this message | ||
On Mon, Apr 30, 2001 at 10:16:13AM -0700, Kasten, Holger wrote:
> I have a strange problem.
> I tried ereg_rplace and str_replace:
>
> $to_test = 'This is a test';
> $to_test = str_replace ("test","little test",$to_test);
> echo $to_test;
>
> the result is: "This is a \little test"
> Why does this happen?
I have no idea. I copied your code and it works as expected.
"This is a little test" is printed out.
--
Jason Stechschulte
jpstech@unoh.edu
--
: - cut in regexps
I don't think we reached consensus on that. We're still backtracking...
-- Larry Wall in <199710291922.LAA07101@wall.org>