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. Quote Link to comment https://forums.phpfreaks.com/topic/13527-grabbing-a-table-from-html/ Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.