title: PHP Simple DOM Parser first child
body: <p>this is a sample code:</p>
  
  <pre><code>&lt;div class="content"&gt;
  &lt;p&gt;text 1&lt;/p&gt;
  &lt;p&gt;text 2&lt;/p&gt;
  &lt;p&gt;text 3&lt;/p&gt;
  &lt;table border="1" cellpadding="0" cellspacing="0" dir="ltr"&gt;
      &lt;tbody&gt;
          &lt;tr&gt;
              &lt;td valign="top" width="205"&gt;
                  &lt;p&gt;td1&lt;/p&gt;
              &lt;/td&gt;
              &lt;td valign="top" width="205"&gt;
                  &lt;p&gt;td2&lt;/p&gt;
              &lt;/td&gt;
              &lt;td valign="top" width="205"&gt;
                  &lt;p&gt;td3&lt;/p&gt;
              &lt;/td&gt;
          &lt;/tr&gt;
      &lt;/tbody&gt;
  &lt;/table&gt;
  &lt;/div&gt;
  </code></pre>
  
  <p>I want print just first level p paragraph </p>
  
  <p>So I try this code:</p>
  
  <pre><code>foreach($html-&gt;find('div.content p') as $p)
  {
      echo $p-&gt;plaintext;
      echo "&lt;br/&gt;";
  }
  </code></pre>
  
  <p>I expect these result:</p>
  
  <pre><code>text 1
  text 2
  text 3
  </code></pre>
  
  <p>But I get these:</p>
  
  <pre><code>text 1
  text 2
  text 3
  td1
  td2
  td3
  </code></pre>
  
  <p>Is there any way to ignore other p tags?</p>