What is the functionality of the function html entities?
Answers were Sorted based on User's Feedback
Answer / sunil biyani
Convert all applicable characters to HTML entities (PHP 3,
PHP 4 , PHP 5)
string htmlentities ( string string [, int quote_style [,
string charset]] )
| Is This Answer Correct ? | 11 Yes | 0 No |
Answer / vijaya
htmlentities will convert all applicable characters to HTML
entities.
| Is This Answer Correct ? | 6 Yes | 0 No |
Answer / tushar kumar kundan
The htmlentities() function converts characters to HTML
entities.
==============================================================
Optional. Specifies how to encode single and double quotes.
The available quote styles are:
* ENT_COMPAT - Default. Encodes only double quotes
* ENT_QUOTES - Encodes double and single quotes
* ENT_NOQUOTES - Does not encode any quotes
=============================================================
<?php
$str = "Jane & 'Tarzan'";
echo htmlentities($str, ENT_COMPAT);
echo "<br />";
echo htmlentities($str, ENT_QUOTES);
echo "<br />";
echo htmlentities($str, ENT_NOQUOTES);
?>
==========================================================
the output
Jane & 'Tarzan'
Jane & 'Tarzan'
Jane & 'Tarzan'
| Is This Answer Correct ? | 2 Yes | 0 No |
What are psrs? Choose 1 and briefly describe it?
What is the functionality of md5 function in php?
What is mysqli_real_escape_string?
How to use the COM components in PHP?
Can a super () and this () keywords be in same constructor?
How can we get the browser properties using PHP?
4 Answers Google, Pollux Softech,
What is use of mysqli_query in php?
What is the use of anonymous function in php?
Explain about Functions in PHP?
What does csrf token mismatch mean?
i have a string and that string contains the alphanumeric value and i want to hide or semihide the 10 digit telephone number from the string.
What is Type hinting in PHP?