ignore code in variable

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
lizlazloz
Forum Commoner
Posts: 64
Joined: Mon Dec 29, 2003 7:29 am

ignore code in variable

Post 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

???
McGruff
DevNet Master
Posts: 2893
Joined: Thu Jan 30, 2003 8:26 pm
Location: Glasgow, Scotland

Post by McGruff »

[php_man]htmlspecialchars[/php_man]
Post Reply