duzun/hQuery.php

How to find all a->href's inside a table listing?

amjithps opened this issue · 1 comments

How to find all a->href's inside a table listing?
duzun commented
// After initializing $doc =  hQuery::fromUrl('http://example.com/someDoc.html');
// Check README.MD
$listOfA = $doc->find('table a');
$listOfHrefs = [];
foreach($listOfA as $a) $listOfHrefs[] = $a->href;

return $listOfHrefs;