Answer the question
In order to leave comments, you need to log in
Simple html dom parser - sequence of elements on a page?
Hello,
the question is probably simple, but something does not work for me. The task is to parse the page and select H2 and H3 tags from it, there is no problem with this. But you need to output them in such a way that the sequence is preserved, that is, if the text looks like this:
<h2>Заголовок 1</h2>
....
<h3>Заголовок 1.1</h3>
...
<h3>Заголовок 1.2</h3>
...
<h2>Заголовок 2</h2>
...
<h3>Заголовок 2.1</h3>
...
<h2>Заголовок 3</h2>
...
<h3>Заголовок 3.1</h3>
...
Answer the question
In order to leave comments, you need to log in
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question