Page 1 of 1

ignore code in variable

Posted: Fri Jan 16, 2004 6:25 pm
by lizlazloz
hi. say i have a variable, say $name.

say the user gives $name the value '<b>bob</b>'

how can i make ti so when $name is echoed the result is:

<b>bob</b>

and not

bob

???

Posted: Fri Jan 16, 2004 6:26 pm
by McGruff
[php_man]htmlspecialchars[/php_man]