How we can remove html tags from string?

143 Views

How we can remove html tags from string?

Remove html tags from string

The strip_tags() function is use to remove any HTML, XML, and PHP tags from a string.

 
 <?php

echo strip_tags("Hello <b><i>world!</i></b>","<b>");

// Output will be Hello world!

?>

 

Tags:-
PHP