how to fetch text nodes in DOM and PHP?

后端 未结 2 658
灰色年华
灰色年华 2021-01-22 12:42

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

2条回答
  •  予麋鹿
    予麋鹿 (楼主)
    2021-01-22 13:02

    $anchor->textContent

    A slightly more info here DOMNode->textContent

    :D

提交回复
热议问题