Does anybody know of a PHP function to encode strings containing special characters like & etc. to strings containing corresponding HTML entities?
The p开发者_运维问答urpose is to display string data on a webpage without causing XML parsing errors.
htmlentities() and htmlspecialchars()
please see htmlentities function.
Cheers
精彩评论