what does htmlentities do in php
snippet in php

what does htmlentities do in php

user9367

<?php 
  
// String convertable to htmlentities  
$str = '<a href="https://www.geeksforgeeks.org">GeeksforGeeks</a>'; 
  
// It will convert htmlentities and print them 
echo htmlentities( $str ); 
?>