Solved

want to see the html tags

Posted on 2013-02-05
3
231 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 500 total points
ID: 38855333
Use htmlspecialchars():

echo htmlspecialchars($html_text);
0
 

Author Closing Comment

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

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

Free Tool: SSL Checker

Scans your site and returns information about your SSL implementation and certificate. Helpful for debugging and validating your SSL configuration.

One of a set of tools we are providing to everyone as a way of saying thank you for being a part of the community.

Question has a verified solution.

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

Popularity Can Be Measured Sometimes we deal with questions of popularity, and we need a way to collect opinions from our clients.  This article shows a simple teaching example of how we might elect a favorite color by letting our clients vote for …
This article discusses how to implement server side field validation and display customized error messages to the client.
The viewer will learn how to create and use a small PHP class to apply a watermark to an image. This video shows the viewer the setup for the PHP watermark as well as important coding language. Continue to Part 2 to learn the core code used in creat…
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.

627 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