adspace


What is the use of htmlspecialchars in php?

Answer Posted / Sukhvir Singh

In PHP, htmlspecialchars() function converts special characters to HTML entities. This is used for displaying user-generated data (like user input) on a webpage to prevent any potential issues caused by those characters such as XSS attacks.

Is This Answer Correct ?    0 Yes 0 No



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

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

1091


What is trait in php?

1065


What does $_files means?

1162


List some features of php that are deprecated in php7?

1024


What is the current stable version of php? What advance thing in php7?

1095


sort term descripttion form, report and uery

2254


Which variable declarations within a class is invalid in php?

1048


how to detect a mobile device using php

1174


hello all, I need some sample placement papers in lion bridge.. can anyone help me?

2177


Tell me what kind of things have you done on the social side?

1065


Write a program using while loop?

1118


How can we extract string "pcds.co.in" from a string "https://info@pcds.co.in" using regular expression of php? More on reg can you explain

1078


Name and explain five of the PHP error constants?

1035


What is difference between static and final in php?

1109


Explain me is it possible to destroy a cookie?

1029