Re: Escaping double quotes?
| From: | Joe Stump | Date: | Sun, 25 Feb 2001 06:57:18 +0000 |
| Subject: | Re: Escaping double quotes? | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-41549@lists.php.net to get a copy of this message | ||
addslashes() usually works for me...
--Joe
On Sun, Feb 25, 2001 at 01:46:30AM -0500, Ben Cheng wrote:
> How do you escape double quotes? I have the following which is
> supposed to make any " in a string into \" but it doesn't seem to
> work. What's wrong with it?
>
> $tmp_string = str_replace ("\"", "\\\"", $tmp_string);
>
> -Ben
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net
> For additional commands, e-mail: php-general-help@lists.php.net
> To contact the list administrators, e-mail: php-list-admin@lists.php.net
--
-------------------------------------------------------------------------------
Joe Stump, PHP Hacker, joestump98@yahoo.com -o)
http://www.miester.org http://www.care2.com
/\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison _\_V
-------------------------------------------------------------------------------