printing out HTML as text

PHP programming forum. Ask questions or help people concerning PHP code. Don't understand a function? Need help implementing a class? Don't understand a class? Here is where to ask. Remember to do your homework!

Moderator: General Moderators

Post Reply
craka
Forum Newbie
Posts: 21
Joined: Thu Jul 11, 2002 9:04 pm

printing out HTML as text

Post by craka »

sorry people.. im a noob here..

I want to make html print out like text insead of being passed as actual HTML... like i want to echo a link.. but i want it to print out the whole <a href..... >text</a> insead of just text as a link...... do you know what i mean?

if you know please give a little code to send me on my way..lol
User avatar
AVATAr
Forum Regular
Posts: 524
Joined: Tue Jul 16, 2002 4:19 pm
Location: Uruguay -- Montevideo
Contact:

html

Post by AVATAr »

See htmlspecialchars() and htmlentities() in the php manual...

:lol:
User avatar
mydimension
Moderator
Posts: 531
Joined: Tue Apr 23, 2002 6:00 pm
Location: Lowell, MA USA
Contact:

Post by mydimension »

here is a quick example:
$textHtmlString = htmlspecialchars($HtmlString)
craka
Forum Newbie
Posts: 21
Joined: Thu Jul 11, 2002 9:04 pm

Post by craka »

awsome.. thanks guys.... :D
Post Reply