Remove div containing a specific class in html with php

-1

Example:

$string = '<div class="teste"> Hello word </div> Hello pessoal';

I want to remove the div containing the test class and its contents.

    
asked by anonymous 01.08.2018 / 21:48

1 answer

-1

This PHP library allows you to modify HTML content:

PHP Simple HTML DOM Parser

    
01.08.2018 / 22:59