I have to parse a page and output <h3>
and the <table>
components (seperatly) that comes right afterwards.
there are cases where there are <p>
tags after the h3 tag like: <h3> title </h3> <p> some text </p>
which are fine if i output the content of the p tag.
how do i parse an html page and group <h3>
s with the element right after them?
(full code described here - PHP DOMDocument: How to make sure I get 2 elements that are h3+table one after an other and not h3+p)