Home » Labs » How To Remove Html Tags From Text In Php with strip_tags  

How To Remove Html Tags From Text In Php with strip_tags


Filed under Labs

In php there is a default function called strip_tags which strips a string from HTML and XML.

Syntax

<?php
 strip_tags(string,allow)
?>

Example

<?php
 echo strip_tags("Hi, <b>Are you there?</b>");
 ?>

The output of the above example will be : Hi, Are you there?

It's only fair to share...Share on Google+Tweet about this on TwitterShare on Facebook

Posts you may like: