Explain the importance of the function htmlentities.



Explain the importance of the function htmlentities...

Answer / Deepak

The `htmlentities()` function is important in PHP because it converts special characters into their HTML entities, preventing them from being interpreted as HTML tags. This helps to ensure the correct display of special characters in HTML documents and prevents Cross Site Scripting (XSS) attacks.

Is This Answer Correct ?    0 Yes 0 No

Post New Answer

More PHP Interview Questions

What does addslashes do in php?

1 Answers  


What is difference between get and post in php?

1 Answers  


How is session id stored in browser?

1 Answers  


What is call by reference in php?

1 Answers  


What is use of in_array() function in php?

1 Answers  


How can I convert ereg expressions to preg in php?

1 Answers  


How can we get second of the current time using date function?

2 Answers   FD, IBM,


How can we submit a form without a submit button?

23 Answers   ABC, HCL, Infosys, Kept Bug, Panys, Rushmore Consultancy, Torque Infotech, Wipro, zCon Solutions,


please explain me mail function in php

2 Answers  


Is php faster than nodejs?

1 Answers  


What is the difference between php and java?

1 Answers  


Seeking a PHP skilled programmer, with knowledge of MySQL Database, Javascript and AJAX. CSS and HTML is a plus. Temporary job for 2 months. Possibility of extending the contract (depending on how good you are). Location: Delhi. Start: ASAP Contact me at boney@portlane.com together with your CV.

0 Answers   Eniro,


Categories