I am trying to output a text value from a php array. The value is
<Carlos>
However when echo'd to the page nothing shows because the browser has transformed it to
<Carlos></Carlos>
How do I stop it from transforming it into tags?
I am trying to output a text value from a php array. The value is
<Carlos>
However when echo'd to the page nothing shows because the browser has transformed it to
<Carlos></Carlos>
How do I stop it from transforming it into tags?
Escape it, for example using htmlentities()
. You'd end up with:
<Carlos>
if all you've written on the page is <Carlos>
HTML won't automatically parse it to <Carlos></Carlos>
. I reckon its the view source of your browser.
try
<Carlos>