Get text from next tag

后端 未结 3 987
终归单人心
终归单人心 2021-01-19 09:39

I have a html snippet that looks like this (of course surrounded by other html):

Header:

Tex

3条回答
  •  [愿得一人]
    2021-01-19 10:12

    This is untested, but you might be looking for simple_html_doms next_sibling() method.

    $html->find('p[class=finfot3]')->next_sibling()->innertext() should return the contents of the second

    element.

提交回复
热议问题