Basic PHP Programming Question:

Download Job Interview Questions and Answers PDF

What Is the difference between htmlentities() and htmlspecialchars()?

PHP Interview Question
PHP Interview Question

Answer:

htmlspecialchars only takes care of <, >, single quote ‘, double quote " and ampersand. htmlentities translates all occurrences of character sequences that have different meaning in HTML.

Download PHP Interview Questions And Answers PDF

Previous QuestionNext Question
What is the output of the ucwords function in this example?How can we destroy the session, how can we unset the variable of a session?