I'm trying to display a code of HTML entity on browser, but they do not show up it convert into their respective element on browser window in chrome and all browsers but i want to display the code of html element without converting using php echo function its possible or not please resolve.
Replace all the &
into &
. You can use htmlentities()
function to do that:
echo htmlentities("<html>"); // <html>
Demo: IDEOne
If you wanna get <html>
, then try doing it twice:
echo htmlentities(htmlentities("<html>"));
Demo: IDEOne