How To Remove Html Tags From Text In Php with strip_tags

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?

Tags: ,

Related posts:

HTML5 page structure

HTML5 offers more powerful structure comparing to older versions of Html. There are many new …


Partner with Us

We are providing an exclusive partnership offer to individuals and companies who are interested in setting up their own web design & development company. For more information about how to partner with us, please contact us