Jump to content

Escaping HTML while using echo


july09

Recommended Posts

Hey all

 

I'm writing my first PHP program which is supposed to fetch an external HTML source and display it. I have the HTML source stored as the variable $pageContents, but when I try to echo it out the browser renders the HTML. This is understandable, but can I somehow just output the raw HTML code without the browser trying to render it?

 

Cheers

Link to comment
https://forums.phpfreaks.com/topic/59149-escaping-html-while-using-echo/
Share on other sites

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.