Monday, May 17, 2010

PHP Use htmlspecialchars() function

Allow to Display double quote in Text Field

Usage : In normally we cant display " " " in text field. Because after " value is break. But using htmlspecialchars() function we can allow to display double quote.

Text Field
<input type="text" name="textfield" value="<?=htmlspecialchars('"')?>">

No comments: