Expiring Today—Celebrate National IT Professionals Day with 3 months of free Premium Membership. Use Code ITDAY17

x
?
Solved

want to see the html tags

Posted on 2013-02-05
3
Medium Priority
?
239 Views
Last Modified: 2013-02-05
$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
0
Comment
Question by:rgb192
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
3 Comments
 
LVL 35

Accepted Solution

by:
gr8gonzo earned 2000 total points
ID: 38855333
Use htmlspecialchars():

echo htmlspecialchars($html_text);
0
 

Author Closing Comment

by:rgb192
ID: 38856211
showed html, thank you
0
 
LVL 111

Expert Comment

by:Ray Paseur
ID: 38856216
You might also find that the output is more readable if you put this before the echo htmlentities() or echo htmlspecialchars()

echo '<pre>';
0

Featured Post

Concerto Cloud for Software Providers & ISVs

Can Concerto Cloud Services help you focus on evolving your application offerings, while delivering the best cloud experience to your customers? From DevOps to revenue models and customer support, the answer is yes!

Learn how Concerto can help you.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

Nothing in an HTTP request can be trusted, including HTTP headers and form data.  A form token is a tool that can be used to guard against request forgeries (CSRF).  This article shows an improved approach to form tokens, making it more difficult to…
Originally, this post was published on Monitis Blog, you can check it here . In business circles, we sometimes hear that today is the “age of the customer.” And so it is. Thanks to the enormous advances over the past few years in consumer techno…
The viewer will learn how to dynamically set the form action using jQuery.
This tutorial will teach you the core code needed to finalize the addition of a watermark to your image. The viewer will use a small PHP class to learn and create a watermark.

719 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question