If I have an HTML document, what is the best way to go through the document and gather the href values from all anchor tags with a particular class using PHP?
相关问题
- Views base64 encoded blob in HTML with PHP
- Laravel Option Select - Default Issue
- PHP Recursively File Folder Scan Sorted by Modific
- Correctly parse PDF paragraphs with Python
- Can php detect if javascript is on or not?
See soulmerge's answer to "Preg_match_all href". Adjust the XPath to
to get a DOMNodeList of all href attributes belonging to elements with a class of
foo
.