php with htmlspecialchars function
| From: | Lisa Nguyen | Date: | Fri, 11 Mar 2011 18:07:24 +0000 |
| Subject: | php with htmlspecialchars function | ||
| Groups: | php.webmaster | ||
| Request: | Send a blank email to php-webmaster+get-10618@lists.php.net to get a copy of this message | ||
Hi
I use one of your example to test the htmlspecialchars :
<?php
$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
echo $new; // <a href='test'>Test</a>
?>
On my browse, it display like below
<a href='test'>Test</a>
Instead:
Test
Please help me how display on browse only "Test", not like view source.
Thanks
Lisa Nguyen