How to clean certain HTML tags with PHP

If you have a string which has HTML and you want to remove only certain tags from it, use the snippet below.

DOMDocument

PHP has this DOMDocument class available for us https://secure.php.net/manual/en/class.domdocument.php

Leave a Reply

Add <code> Some Code </code> by using this tags.

*
*