Hi - hopefully someone here will have a suggestion for me. I have a form which posts data, and I'd like to have PHP automatically convert any submitted quotation marks (") into HTML ("😉. I don't want to simply use addslashes() and stripslashes(), I actually want the conversion to take place. Essentially I need a trimmed down version of the htmlspecialchars() function that only converts quotes and nothing else (so that other characters are left alone). From what I've read, to replace one thing with another thing I need to do something like
strreplace("onething", "anotherthing", "$text");
The problem is, if I use
strreplace(""", """, $text");
I'll get a parse error. Any suggestions?