Q. Which function converts special characters to HTML entities?
β
Correct Answer: (A)
htmlspecialchars()
Explanation: htmlspecialchars() is used to prevent XSS by escaping HTML characters.