Mega Code Archive

 
Categories / Php / Strings
 

Strip_tags() function, first argument is the text to transform

The second argument is optional and should be a list of HTML tags that strip_tags() can leave in place.  <?php $string = "<p>I <i> will not have </i>it,"; $string .= "<br/>.</p><b>The end</b>"; print strip_tags( $string, "<br/>" ); ?>