How to remove HTML tags from data in PHP?

With the help of strip_tags() we can removed html tags from data in PHP. The strip_tags() function strips a string from HTML, XML, and PHP tags.


First parameter is required. It specifies the string to check.

The second parameter is optional. It specifies allowable tags. Mention tags will not be removed

Suggest An Answer

No suggestions avaliable!

Latest post from PHP interview questions

Ask Question