Answer the question
In order to leave comments, you need to log in
How to parse a DIV with a specific class using simple html dom?
Good afternoon. How to parse a DIV with a specific class using simple html dom? I try so: Issues all loaded page.
include 'simple_html_dom.php';
$html = new simple_html_dom();
$url = file_get_html('https://4pda.ru/forum/index.php?showuser=5083350');
$html->load($url);
$ret = $html->find('.statistic-box');
var_dump($ret);
Answer the question
In order to leave comments, you need to log in
Option 1:
$ret = $html->find('.statistic-box');
echo $ret[0]->plaintext;
$ret = $html->find('*[class=statistic-box]');
echo $ret[0]->plaintext;
Didn't find what you were looking for?
Ask your questionAsk a Question
731 491 924 answers to any question