This question seems to have been answered many times, but I still canโt put together the parts.
I would like to get the node value of each class by name. eg
<td class="thename"><strong>32</strong></td> <td class="thename"><strong>12</strong></td>
I would like to capture 32 and 12. I assume that this is required for a type loop, but not quite exactly how to implement this. That's what i still have
$domain = "http://domain.com"; $dom = new DOMDocument(); $dom->loadHTMLFile($domain); $xpath = new DomXpath($dom); $div = $xpath->query('//*[@class="thename"]')->item(0); $stuff = $div ->textContent; echo($stuff);
Sammy source share