For example if you want to decode a variable
<?php
$orig = "I'll \"walk\" the <b>dog</b> now";
$a = htmlentities($orig); // To convert encode the string
$b = html_entity_decode($a); // To convert back
echo $a; // I'll "walk" the <b>dog</b> now
echo $b; // I'll "walk" the <b>dog</b> now
?>
No comments:
Post a Comment