tags:

views:

284

answers:

3

I have a peice of data that is large and will probably contain quotes and double quotes.

I'm using mysql_real_escape_string() to store it safely.

When I pull it out to look at it, all the quotes are escaped. I tried using str_replace to just get rid of all the quotes, but that turns \r\n's into rn. :(

How can I reverse it so the data comes back out the way it went in?

A: 

I meant to get rid of the backslashes, not the quotes.

Ryan
Use the comment function under the answer to comment on that answer.
Gumbo
Ryan needs 50 rep before he can comment. (There's 10. 8-)
RichieHindle
@Richie: are you sure? it's his own question.
SilentGhost
@Ryan: update your question and then delete this non-answer.
SilentGhost
+1  A: 

Do you use magic quotes?

Note: If magic_quotes_gpc is enabled, first apply stripslashes() to the data. Using this function [mysql_real_escape_string] on data which has already been escaped will escape the data twice.

OIS
+1  A: 

Try:

http://www.php.net/stripslashes

Stojg