php remove html tags

39

/*  EXAMPLE:	<p>Bed & Breakfast</p>	-->	  <p>Bed & Breakfast</p>  
    & 	&
    " 	" 				(unless ENT_NOQUOTES is set)
    ' 	' or ' 	(ENT_QUOTES must be set)
    < 	<
    > 	>				*/

<?php
$new = htmlspecialchars("<a href='test'>Test</a>", ENT_QUOTES);
echo $new; 					// <a href='test'>Test</a>
?>

Comments

Submit
0 Comments