Convert HTML to Entities or Entities to HTML
This is useful if you want to display your code to your website, blog or community forum.
<?php
$text = ‘<?php echo \’hello world\’; ?>’;
$encode = htmlentities($text);
$decode = html_entity_decode($encode);
echo ‘Encode ‘.$encode;
echo ‘<br />’;
echo ‘Decode ‘.$decode;
?>


23. Dec, 2007



