Remove html tags in php

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


6 points

This is a very basic question. I want to remove HTML tags using PHP code. How do I do it?



2 points

You can use PHP strip_tags() function to remove html tags from your string. You can also use HTML purifier (http://htmlpurifier.org/) to do this for you.

Anonymous's picture
Created by Anonymous

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 <% ... %>.