 <p>The code you've shared seems very close. See below to output the first child <code>&lt;tr&gt;</code> of the table, if an <code>&lt;a&gt;</code> element is found, then stop looping through additional <code>&lt;a&gt;</code> elements. What specific problems are you having with your code?</p> <pre><code>foreach ($html-&gt;find('table') as $name) { foreach ($name-&gt;find('a') as $elem) { echo $name-&gt;find('tr', 0)-&gt;plaintext; // echo first TR element echo $elem-&gt;plaintext.'&lt;br&gt;'; // echo A element break 1; // skip to the next table } } </code></pre>