Escaping HTML
<?php print 'The comment was: '; print htmlentities($_POST['comment']); ?>
1. | Checking for magic quotes | ||
2. | Generating XML from an array | ||
3. | htmlentities() function converts all characters into their equivalent HTML entities. | ||
4. | htmlentities.php | ||
5. | Encoding HTML entities in a string |