PHP | htmlentities()
The htmlentities() function is used to convert all applicable characters to HTML entities.
<?php
$str = '<a href="http://www.studyzone4u.com">Let's GO</a>';
echo htmlentities($str);
// output will be (source code)
<a href=" http://www.studyzone4u.com ">Let's GO</a>
?>