Javatpoint Logo
Javatpoint Logo

PHP htmlentities() Function

PHP htmlentities() function is string function, which is used to convert character to HTML entities.

Syntax:

Parameter Description Required/Optional
String Specify the string to convert. required
flags Specify how to manage quotes, invalid encoding. optional
Character Specify the character set optional
Double_encode Specify a Boolean value. optional

Example 1

Output:

Example 2

Output:

Hello PHP : 'E=MC˛'
Hello PHP : 'E=MC˛'
Hello PHP : 'E=

Next TopicPHP String




Help Others, Please Share

facebook twitter pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA