开发者

PHP function to encode & etc. characters to corresponding HTML entities

开发者 https://www.devze.com 2022-12-09 22:25 出处:网络
Does anybody know of a PHP function to encode strings containing special characters like & etc. to strings containing corresponding HTML entities?

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

0

精彩评论

暂无评论...
验证码 换一张
取 消