• PHP Video Tutorials

PHP - Function Html Special Chars Decode



Syntax

string htmlspecialchars_decode ( string $string [, int $flags = ENT_COMPAT | ENT_HTML401 ] )

Definition and Usage

It is used to convert convert special HTML entities back to 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
   $str = "<p>tutorials -> </p>\n";
   
   echo htmlspecialchars_decode($str);
?>

This will produce following result − −

tutorials -> "
php_function_reference.htm
Advertisements