• PHP Video Tutorials

PHP - Function Html Entity Decode



Syntax

string html_entity_decode ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 
   [, string $encoding = ini_get("default_charset") ]] )

Definition and Usage

It is used to convert HTML entities to their application characters

Return Values

It returns the decoded string.

Parameters

Sr.No Parameters & Description
1

string

It contains the information about input string

2

flags

It contains the information about flags

Example

Try out the following example

<?php
   $input = "tutorials \"point\" simply <b>easy</b> learning";
   $ab = htmlentities($input);
   $b = html_entity_decode($ab);
   
   echo $ab;
?>

This will produce following result − −

tutorials "point" simply <b>easy</b> learning
php_function_reference.htm
Advertisements