title: PHP get first child from div
body: <p>In below HTML Code, I want to get the content of <code>p tag</code></p>
  
  <h2>Example</h2>
  
  <pre><code>&lt;div class="body" style="text-align: justify;padding: 10px;"&gt;
     &lt;p style="text-align: justify;" dir="RTL"&gt;
        ...............
     &lt;/p&gt;
  
     TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST TEST 
  &lt;/div&gt;
  </code></pre>
  
  <p>My current code is :</p>
  
  <pre><code>$dom = new DOMDocument;
  $dom-&gt;loadHTML($content);
  
  echo $dom-&gt;getElementsByTagName('div')-&gt;item(0)-&gt;childNodes;
  </code></pre>
  
  <p>Why this code isn't correct and how to resolve this issue.</p>