PHP strip_tags()

This Comment will be submitted for moderation and will not be accessible to other users until it has been approved.


PHP strip_tags() function strips HTML and PHP tags from a string.

Syntax:

<?php
string strip_tags 
string str [, string allowable_tags] )
?>

This function to return a string with all HTML and PHP tags stripped from a given string.

You can use the optional second parameter to specify tags which
should not be stripped.





Post Comment

  • You can enable syntax highlighting of source code with the following tags: <code>, <blockcode>, <c>, <cpp>, <drupal5>, <drupal6>, <java>, <javascript>, <php>, <python>, <ruby>. Beside the tag style "<foo>" it is also possible to use "[foo]". PHP source code can also be enclosed in <?php ... ?> or <% ... %>.