tags:

views:

22

answers:

2

Hi Guys,

Does anybody know of a PHP function to encode strings containing special characters like & etc. to strings containing corresponding HTML entities?

The purpose is to display string data on a webpage without causing XML parsing errors.

+2  A: 

htmlentities() and htmlspecialchars()

Sergej Andrejev
+2  A: 

please see htmlentities function.

Cheers

RageZ