08
Sep

htmlentities function converts all applicable characters to HTML entities. For example “<b>Hello World</b>” is converted to ” &lt;b&gt;Hello World&lt;/b&gt;

Using this function is simple and easy. I have coded a example below;

<?php

$text = ‘<b>Hello World</b>’;

echo htmlentities($text);

?>

If you have any questions please post a comment and i will contact you as soon as possible.

Leave a Reply

You must be logged in to post a comment.