I\'m getting this error:
error on line 4 at column 1: Extra content at the end of the document
with this code:
$this-&g
Without seeing the text output itself, it would be impossible to know for sure, but there are a couple of things I noticed immediately:
header("Content-type: text");.& after replacing everything else with an entity. This means you're getting, < instead of <.str_replace takes arrays as parameters, you would be best using them.