How we can remove html tags from string?

Last updated 2 years, 4 months ago | 757 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!

?>