How can I take all the attributes of an element? As in my example below, I can only get one at a time, I want to pull out all the attribute of the anchor tag.
$dom = new DOMDocument(); @$dom->loadHTML(http://www.example.com); $a = $dom->getElementsByTagName("a"); echo $a->getAttribute('href');
thanks!
dom php domdocument
Loreto Gabawa Jr.
source share