$imgEle = $table
->childNodes->item(1)
->childNodes->item(0)
->childNodes->item(1);
$ele = $table
->childNodes->item(1)
->childNodes->item(2)//td
->getElementsByTagName('strong')
;
$minTemp = $ele->item(0)->nodeValue;
$maxTemp = $ele->item(1)->nodeValue;
$imgSrc = $imgEle->getAttribute('src');
Title:
DomDocument childNodes attributes nodeValue getAttribute
Description:
$imgEle = $table ->childNodes->item(1) ->childNodes->item(0) ->childNodes->item(1); $ele = $table -&...
...
Rating:
4