Answers for "php html special character"

PHP
3

html special characters php

/*  EXAMPLE:	<p>Bed & Breakfast</p>	-->	  <p>Bed &amp; Breakfast</p>  
    & 	&amp;
    " 	&quot; 				(unless ENT_NOQUOTES is set)
    ' 	&#039; or &apos; 	(ENT_QUOTES must be set)
    < 	&lt;
    > 	&gt;				*/

<?php
$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
echo $new; 					// <a href='test'>Test</a>
?>
Posted by: Guest on September-05-2021
0

html special characters php

$string = "This is testing message "ETC" ";
htmlspecialchars($string, ENT_COMPAT)
Posted by: Guest on January-06-2021

Code answers related to "php html special character"

Browse Popular Code Answers by Language