Get text from next tag

后端 未结 3 990
终归单人心
终归单人心 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:36

    Find the p element with the class. Then use

    • $e->next_sibling() - Returns the next sibling of element, or null if not found.

    where $e is the element with the class.

    For better alternatives to SimpleHtmlDom, see Best Methods to parse HTML

提交回复
热议问题