LiveWire Network Peer Answers Peer Support Teen Forums Tech Forums College Forums 700 users online 225473 members 1164 active today Advertise Here Sign In
TeenCollegeTechPhotos | Quizzes | LiveSecret | Memberlist | Dictionary | News | FAQ
Member Spotlight
EmbraceTheHate
Music: most of it.
Mood: Pensive
You have 1 new message.
Emergency Help
Until you sign up you can't do much. Yes, it's free.

Sign Up Now
Membername:
Password:
Already have an account?
Invite Friends
Active Members
Groups
Contests
Moderators
9 online / 20 MPM
Fresh Topics
  LiveWire / Technical Forums / Programming & Application Development / Adding Reply

Quoting Post
Archived Topic: It will not be bumped to the top of the forum.
Topic Prevent HTML with PHP
Membername   Not a member? Sign Up Free (takes 20 seconds)
Password   Forgotten your password?
Post

Font:   Size:   Color:

FAQ Keyword Search:
Post Options
Favorites Manager
Notify me of new replies to this topic by email
Notify me of new replies to this topic by private message
Original Post
masterfultemptation Posted at 9:52 am on Sep. 21, 2006
Okay, so I'm outputting information from a variable.

Code:
$variable = "<iframe src="http://www.google.com";></iframe>";

Now I want to print the contents of this variable.

Code:
print("$variable");

But, seeing as how the contents of the variable is HTML code, how do I output it as-is...so it out puts exactly

Code:
<iframe src="http://www.google.com";></iframe>

Instead of creating the iframe.

Note, the iframe was just an example...I need this for other commands as well.

Thanks

Replies
masterfultemptation Posted at 9:52 am on Sep. 21, 2006
Okay, so I'm outputting information from a variable.

Code:
$variable = "<iframe src="http://www.google.com";></iframe>";

Now I want to print the contents of this variable.

Code:
print("$variable");

But, seeing as how the contents of the variable is HTML code, how do I output it as-is...so it out puts exactly

Code:
<iframe src="http://www.google.com";></iframe>

Instead of creating the iframe.

Note, the iframe was just an example...I need this for other commands as well.

Thanks

All 6 previous replies displayed.