Thanks! I had not heard of addcslashes(). That seems more apropos in this case. Yeah, if the double quotes aren't escaped it will turn up the dreaded unexpected T_STRING error.
Also yes, I think this would be primarily used for JavaScript blocks, and possibly CSS in rare cases. So '"$\'" makes sense. Is there any instance where I'd want to prevent the insertion of newline?
|