graham23s Posted March 28, 2010 Share Posted March 28, 2010 Hi Guys, I was wondering if there was any way i can print the contents to screen a domDocument, the path isn't working so it thought i could have a look and go from there. code: $dom = new DOMDocument(); $dom->loadHTML($html); $xpath = new DOMXPath($dom); $results = $xpath->query("/html/body/div[3]/center/table/tbody/tr[1]/td/table/tbody/tr/td[2]/div[@id='content']/table[1]/tbody/tr[2]/td[2]/em/font/span"); thanks guys Graham Quote Link to comment Share on other sites More sharing options...
salathe Posted March 28, 2010 Share Posted March 28, 2010 Use the saveXML method on $dom: i.e. echo $dom->saveXML(); Quote Link to comment 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.