|
htmlentitiesConvert all applicable characters to HTML entities Description
string htmlentities(
string $string ,int $flags = ENT_QUOTES | ENT_SUBSTITUTE | ENT_HTML401,stringnull $encoding = null ,bool $double_encode = true )
This function is identical to htmlspecialchars in all
ways, except with htmlentities, all characters which
have HTML character entity equivalents are translated into these entities.
The get_html_translation_table function can be used
to return the translation table used dependent upon the provided
If you want to decode instead (the reverse) you can use html_entity_decode. Parameters
Return ValuesReturns the encoded string.
If the input Changelog
Examples
Example #1 A htmlentities example
The above example will output: A 'quote' is <b>bold</b> A 'quote' is <b>bold</b>
Example #2 Usage of
See Also
|