clarencek Posted July 3, 2006 Share Posted July 3, 2006 Hi, I'm trying to grab a table from html using a php function preg_match_all, but it doesn't seem to work. Is the following correct?$url = 'http://somehtmlpage.com/blah.html';$page = file_get_contents($url);if (preg_match_all('/<table>(.+?)<\/table>/gi', $page, $links, PREG_SET_ORDER)) for($i = 0; $i < count($links); $i++){ print_r($links[$i]); echo "<br />"; }Thanks. Link to comment https://forums.phpfreaks.com/topic/13527-grabbing-a-table-from-html/ Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.