Golgappa.net | Golgappa.org | BagIndia.net | BodyIndia.Com | CabIndia.net | CarsBikes.net | CarsBikes.org | CashIndia.net | ConsumerIndia.net | CookingIndia.net | DataIndia.net | DealIndia.net | EmailIndia.net | FirstTablet.com | FirstTourist.com | ForsaleIndia.net | IndiaBody.Com | IndiaCab.net | IndiaCash.net | IndiaModel.net | KidForum.net | OfficeIndia.net | PaysIndia.com | RestaurantIndia.net | RestaurantsIndia.net | SaleForum.net | SellForum.net | SoldIndia.com | StarIndia.net | TomatoCab.com | TomatoCabs.com | TownIndia.com
Interested to Buy Any Domain ? << Click Here >> for more details...

What is the functionality of the function html entities?

Answer Posted / 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



Post New Answer       View All Answers


Please Help Members By Posting Answers For Below Questions

What is csrf token and how it works?

1003


Could we start a variable with number like $4name?

916


What are the differences between php3 and php4 and php5? What is the current stable version of php? What advance thing in php7?

1047


How to get no of arguments passed to a PHP Function?

939


What is the meaning of xdebug?

969


What is htaccess? Why do we use this and where?

989


What are the rules for naming a php variable?

1053


Tell me what is the difference between exception::getmessage and exception::getline?

897


How do you put a space in html?

997


What are the different components used in php for formatting?

1048


How we can declare variable in php?

967


Is php a middleware?

958


What are the different filter functions used to filter a variable?

982


List some array functions in php?

933


How can we connect to a mysql database from a php script?

1104