If I have the following html:
<div id="thisID">100</div>
I can get the value, 100, like this:
$dom = new DOMDocument();
$dom->loadHTMLFile($url);
$data = $dom->getElementById("thisID");
$result = $data->nodeValue;`
But what about this html?
<span class="foo" id="bar" itemprop="price">100</span>
Is there a way I can get an element content by a tag variable and value, in this case itemprop="price"
?