Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- <?php
- $html = file_get_contents("http://www.doe.gov.my/apims/index.php");
- // a new dom object
- $dom = new domDocument;
- // load the html into the object
- $dom->loadHTML($html);
- // discard white space
- $dom->preserveWhiteSpace = false;
- $tables = $dom->getElementsByTagName('table');
- foreach($tables as $table)
- {
- echo $dom->saveHTML($table);
- }
- ?>
Advertisement
Add Comment
Please, Sign In to add comment