htmlentities() function converts all characters into their equivalent HTML entities. : htmlentities « HTML « PHP
- PHP
- HTML
- htmlentities
htmlentities() function converts all characters into their equivalent HTML entities.
The syntax is: string htmlentities (string string)
<?
$user_input = "costs < $42.25.";
$converted_input = htmlentities($user_input);
print $converted_input;
?>
Related examples in the same category