0

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 Answers 2

2

htmlentities() and htmlspecialchars()

Sign up to request clarification or add additional context in comments.

Comments

2

please see htmlentities function.

Cheers

Comments

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge you have read our privacy policy.

Start asking to get answers

Find the answer to your question by asking.

Ask question

Explore related questions

See similar questions with these tags.