strip_tags() function, first argument is the text to transform. : strip_tags « String « PHP






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/>" );
?>
  
  








Related examples in the same category

1.strip_tags
2.strip_tags() function removes all HTML and PHP tags from string, leaving only the text entities.
3.strip_tags.php
4.strip_tags.php
5.string strip_tags ( string html_text [, string allowed_tags] ) strips HTML and PHP tags from a string
6.Stripping HTML tags from a string
7.Strip all except a few tags