How to display a PHP string "AS IS" (special characters inside)?
This is probably a simple question, but I haven't found an "easy" solution.
I have a PHP string containing exactly these characters:
<code>
<language>
Test string
</language>
<content>for(i<10)</content>
</code>
I just want to show this AS IS (char by char) string so I can put it in the textbox. I've tried htmlentities, htmlspecialchar of course, but that's clearly not what I want.
If I use basic "echo", it <
is replaced with '<'. This is problem!
+3
source to share