title: get complete 'div' content using class name or id using php
body: <p>i got a page source from a file using php and its output is similar to </p>
  
  <pre><code>&lt;div class="basic"&gt;
  
   &lt;div class="math"&gt;
  
    &lt;div class="winner"&gt;
  
     &lt;div class="under"&gt;
  
          &lt;div class="checker"&gt;
  
           &lt;strong&gt;check&lt;/strong&gt;
  
          &lt;/div&gt;
  
     &lt;/div&gt;
  
    &lt;/div&gt;
  
   &lt;/div&gt;
  
  &lt;/div&gt;
  </code></pre>
  
  <p>from this i need to got only a particular 'div' with whole div and contents inside like below when i give input as 'under'(class name) . anybody suggest me how to do this one using php</p>
  
  <pre><code>&lt;div class="under"&gt;
  
        &lt;div class="checker"&gt;
  
           &lt;strong&gt;check&lt;/strong&gt;
  
        &lt;/div&gt;
  
   &lt;/div&gt;
  </code></pre>