PHP DOMDocument : how to select all links under a specific tag

后端 未结 3 1627
耶瑟儿~
耶瑟儿~ 2021-01-23 15:33

I\'m just getting started with using php DOMDocument and am having a little trouble. How would I select all link nodes under a specific node lets say

in jquery i could

3条回答
  •  长发绾君心
    2021-01-23 16:09

    Retrieve the DOMElement whose children you are interested in and call DOMElement::getElementsByTagName on it.

提交回复
热议问题