How to get value using DOM HTML
<p>I have a html:</p>

<pre><code>$content = "
&lt;tr&gt;
   &lt;td class="ttl"&gt;&lt;a href="#"&gt;Colors&lt;/a&gt;&lt;/td&gt;
   &lt;td class="nfo"&gt;Dark Grey, Rose Red, Blue, Brown, Sand White&lt;/td&gt;
&lt;/tr&gt;";
</code></pre>

<p>And code php:</p>

<pre><code>$dom = new DOMDocument();
@$dom-&gt;loadHTML($content);      
$xpath = new DOMXPath($dom);

$attbs = $xpath-&gt;query("//td[@class='ttl']");
foreach($attbs as $a) { 
    print $a-&gt;nodeValue;
}

$values = $xpath-&gt;query("//td[@class='nfo']");
foreach($values as $v) { 
    print $v-&gt;nodeValue;
}
</code></pre>

<p>How get value of 2 td but only using 1 foreach </p>
