Home » PHP htmlentities() function

PHP htmlentities() function

by Online Tutorials Library

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

You may also like