Answer the question
In order to leave comments, you need to log in
Cut out a necessary piece from a web page?
The situation is this:
I'm using Simple HTML DOM.
Given:
$result = simple_html_dom т.е. html код всей страницы
$selector = 'div.column_1.column_3'
Answer the question
In order to leave comments, you need to log in
Part 2 is most likely $html->find('div.column_1.column_3');, and 1 and 3 are unlikely to succeed with this library (unless these next_sibling() and prev_sibling() methods, although it is unlikely ) better with regex
You can use this library: simplehtmldom.sourceforge.net
and take only what you need at once, without splitting.
And if you still answer your question, then these are regular expressions and nothing better than them.
Read "regular expressions" and functions for working with them, for example preg_match()
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question