Use htmlentities() to Convert Characters to HTML Entities

Use htmlentities() to Convert Characters to HTML Entities

The htmlentities() function converts all applicable characters to HTML entities. This is useful for displaying user input in a web page without executing any embedded HTML or JavaScript code.

← Back to Tips List