How we can remove html tags from string?

Last updated 5 years, 3 months ago | 1993 views 75     5

Tags:- PHP

PHP | Remove html tags from a 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!

?>