below is my current code that pulls the html
BEFORE
<td class="winner betting-movement">
11/8<img src="/images/site/blue-arrow-small.gif" width="6" height="11">6/4 </td>
Then replaces images with text
After
<html><body><td class="winner betting-movement">$movement = $article->childNodes->item(12)->ownerDocument->saveHTML($article->childNodes->item(12))."<br />";
<? php @$dom3->loadHTML($movement);
$xpath5 = new DOMXPath($dom3);
foreach($xpath5->query('//img[contains(@src, "blue")]') as $link) {
$link->parentNode->replaceChild($dom3->createTextNode(" > "), $link);
}
foreach($xpath5->query('//img[contains(@src, "red")]') as $link) {
$link->parentNode->replaceChild($dom3->createTextNode(" < "), $link);
}
echo $dom3->saveHTML();?>
works great but all i need to do now is output the new saved html as just the inner text e.g "11/8 > 6/4"
echo $dom3->saveHTML()->textContent;
sadly the last line doesn't work and im reaching out to see if anyone could point me in a quick fix for this?