PHP htmlentities() Function

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

Syntax:

ParameterDescriptionRequired/Optional
StringSpecify the string to convert.required
flagsSpecify how to manage quotes, invalid encoding.optional
CharacterSpecify the character setoptional
Double_encodeSpecify a Boolean value.optional

Example 1

Output:

Example 2

Output:

Hello PHP : 'E=MC�'
Hello PHP : 'E=MC�'
Hello PHP : 'E=

Next TopicPHP String




Latest Courses