I have tried this code but this gives me hyperlinks value only, but i want to extract all the data from table. My HTML table contains 1514 rows and 7 columns along with pagination its contains 125 number of pages to show. How can I get all data from the table and not just the hyperlinks?
  <?php
$ch=curl_init('https://datatables.net/examples/basic_init/alt_pagination.html');
    curl_setopt($ch, CURLOPT_RETURNTRANSFER, true);
    $page = curl_exec($ch);
    preg_match('#<table[^>]*>(.+?)</table>#is', $page, $matches);
    foreach ($matches as &$match) {
         $match = $match;
    }
    echo '<table>';
        echo $matches[0];
    echo '</table>';
    ?>