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 |
hello friend koi mujhe bata skta ke php easy way se aur jaldi kese seekh skte h...plz im waiting for ur answer..
What is mvc in php?
What is the function to count elements in an array in PHP?
What is cookies? How to create cookies in php?
What is the functionality of the functions strstr() and stristr()?
Tell me how can we automatically escape incoming data?
How many types of php are there?
Which is the best institute in Chennai to learn PHP? Please help.
What is the use of header() function in PHP? What the Limitation of HEADER()?
How do you call a constructor for a parent class?
How to Pass JSON Data in a URL using CURL in PHP?
Write logic to print Floyd's triangle in PHP?