Search
 
SCRIPT & CODE EXAMPLE
 
CODE EXAMPLE FOR PHP

htmlspecialchars (PHP 4, PHP 5, PHP 7, PHP 8) htmlspecialchars — Convert special characters to HTML entities

<?php
$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
echo $new; // &lt;a href=&#039;test&#039;&gt;Test&lt;/a&gt;
?>
 
PREVIOUS NEXT
Tagged: #htmlspecialchars #PHP #PHP #PHP #htmlspecialchars #Convert #special #characters #HTML #entities
ADD COMMENT
Topic
Name
1+7 =