I have the following code to retrieve all hyper links in an HTML document
and my question is how to retrieve the text nodes inside every anchor tag
(even if th
$anchor->textContent
A slightly more info here DOMNode->textContent
:D
Heres what you can do:
(string)$anchor->nodeValue;
As referenced in the DomDocument::DomNode page