Q. What is the purpose of the PHP function htmlspecialchars()?
β
Correct Answer: (A)
Convert special characters to HTML entities
Explanation: It is used to prevent XSS by converting characters like <, > to their HTML entities.