PHP htmlentities() Function

Generally, character encoding is done in various ways in PHP which provides many functions to perform these conversions, onto a given input string, from one form to another. You may also like PHP htmlspecialchars_decode() Function.


$str = '<a href="">Go to</a>';
echo htmlentities($str);


 <a href="">Go to</a> 

Leave a Reply

Your email address will not be published. Required fields are marked *