Php regular expression to match a div

Posted by Thoman on Stack Overflow See other posts from Stack Overflow or by Thoman
Published on 2010-06-02T11:03:01Z Indexed on 2010/06/02 11:03 UTC
Read the original article Hit count: 186

Filed under:
|

Hello all

    <div id="a">
       <div id="b">
        Foo
      </div>
       <div id="m">
       Bar
      </div>
     </div>
     <div id="c">
       Bar
      </div>

I want find all object in id="a" and out put is

 <div id="a">
   <div id="b">
    Foo
  </div>
   <div id="m">
   Bar
  </div>
 </div>

Geat thanks.

© Stack Overflow or respective owner

Related posts about php

Related posts about regex