Page 1 of 1

printing out HTML as text

Posted: Wed Sep 18, 2002 10:07 pm
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

html

Posted: Wed Sep 18, 2002 10:13 pm
by AVATAr
See htmlspecialchars() and htmlentities() in the php manual...

:lol:

Posted: Wed Sep 18, 2002 10:14 pm
by mydimension
here is a quick example:
$textHtmlString = htmlspecialchars($HtmlString)

Posted: Wed Sep 18, 2002 10:25 pm
by craka
awsome.. thanks guys.... :D