want to see the html tags

$html_text='<h1>sample text</h1>';

when I echo $html_text, I get large 'sample text'
I want to see this on the browser screen '<h1>sample text</h1>';

I want to see all the html tags
Who is Participating?
gr8gonzoConnect With a Mentor ConsultantCommented:
Use htmlspecialchars():

echo htmlspecialchars($html_text);
rgb192Author Commented:
showed html, thank you
Ray PaseurCommented:
You might also find that the output is more readable if you put this before the echo htmlentities() or echo htmlspecialchars()

echo '<pre>';
Question has a verified solution.

Are you are experiencing a similar issue? Get a personalized answer when you ask a related question.

Have a better answer? Share it in a comment.

All Courses

From novice to tech pro — start learning today.