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: [EMAIL PROTECTED]
> For additional commands, e-mail: [EMAIL PROTECTED]
> To contact the list administrators, e-mail: [EMAIL PROTECTED]

-- 

-------------------------------------------------------------------------------
Joe Stump, PHP Hacker, [EMAIL PROTECTED]                                 -o)
http://www.miester.org http://www.care2.com                                 /\\
"It's not enough to succeed. Everyone else must fail" -- Larry Ellison     _\_V
-------------------------------------------------------------------------------


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to