Getting the HTML TABLE data from a URL in to php variables and displaying

I need to get the table data in this url “”, please help me with a working code. Many thanks

Hey Shebeer,

What have you tried so far?

Try using the Tidy library

include "simple_html_dom.php";
$url = '';
$html = file_get_html($url);
foreach($html->find('table#statistics thead tr') as $i=>$tr) {
 if ($i==0) {

    echo "<br/>\$i=".$i;
    $anchor = $tr->find('td', 0);
    echo " => ".$anchor;


the code i have given above , but the output is not getting. please help me out

can you please explain a bit more :slight_smile: thanks

There’s no table#statistics on the page that you’re parsing.

This topic was automatically closed 91 days after the last reply. New replies are no longer allowed.