0

I have a code to remove all empty elements from php output:

    $original="";
    while($body != $original) {
    $original = $body;
    $body = preg_replace('%<(.*?)[^>]*>\\s*</\\1>%', '', $body);
    }

I want to remove all empty element except one empty div with id="maximenu"

How can I change the code above to fix this?

Thank you.

Sah Ht
  • 21
  • 2

0 Answers0