It convert special characters to HTML entities
Example
<?php
echo htmlspecialchars(“<a href=’http://phpcodez.comt’>phpcode</a>”);
?>
Output
<a href=’http://phpcodez.comt’>phpcode</a>
It convert special characters to HTML entities
Example
<?php
echo htmlspecialchars(“<a href=’http://phpcodez.comt’>phpcode</a>”);
?>
Output
<a href=’http://phpcodez.comt’>phpcode</a>
It convert special HTML entities back to characters
Example
<?php
echo htmlspecialchars_decode(“<p>php >”);
?>
Output
php >
It convert all applicable characters to HTML entities
Example
<?php
echo htmlentities(“<a>PHP<a> <br /> <p>HTML</p>”);
?>
Output
<a>PHP<a> <br /> <p>HTML</p>
It convert all HTML entities to their applicable characters
Example
<?php
echo html_entity_decode(“PHP & HTML”);
?>
Output
PHP & HTML
It decodes a hexadecimally encoded binary string
Example
<?php
echo hex2bin(“d706c6520686578206461”);
?>
It convert logical Hebrew text to visual text with newline conversion
It converts logical Hebrew text to visual text