Your Ad Here

Saturday, November 7, 2009

What’s the difference between htmlentities() and htmlspecialchars()?

The htmlspecialchars() function converts some predefined characters to HTML entities.
The predefined characters are:
* & (ampersand) becomes &
* " (double quote) becomes "
* ' (single quote) becomes '
* < (less than) becomes &lt;
* > (greater than) becomes &gt;

htmlentities — Convert all applicable characters to HTML entities.

No comments:

Post a Comment

Your Ad Here