DISCLAIMER:
I've had a hunt around on here already, but I'm still struggling (with quotes).
PROBLEM:
I'm taking information from a form in one page, then displaying it in the subsequent POST page. The problem is as follows; I've fudged single quote replacement using this code;
$text = str_replace("\'","'",$text);
Trouble is, I'd like to give the user the option of entering double quotes into the $text variable also. I replicated the single quote code above, but it doesn't appear to be working;
$text = str_replace("\"",""",$text);
when $text is printed to screen and it contains double quotes, they always appear as \" (still) in the HTML output, e.g;
$text contains the sentence "big fluffy animals"
When called to screen, it prints \"big fluffy animals\"
I've had a fiddle with my PHP.ini file, and this is what it looks like at present;
; Magic quotes for incoming GET/POST/Cookie data.
magic_quotes_gpc = On
; Magic quotes for runtime-generated data, e.g. data from SQL, from exec(), etc.
magic_quotes_runtime = On
; Use Sybase-style magic quotes (escape ' with '' instead of \').
magic_quotes_sybase = Off
Sorry to be so anal when posting the details, just trying to be thorough. Any help would be greatly appreciated...