·
1 min read
·
1 comment
XPath with HTML in PHP One Liner
Here is a one liner for using XPATH with HTML in PHP $doc = new DOMXPath(@DOMDocument::loadHTML(filegetcontents("https://www.reddit.com/r/PHP/"))); Now you can use XPATH to query the html.....