I have difficulties to get second link href and Text. How to select class="secondLink SecondClass". Using PHP Dom, Thank you
<td class="pos" >
<a class="firstLink" href="Search/?List=200003000112097&sr=1" >
Firs link value
</a>
<br />
<a class="secondLink SecondClass" href="/Search/?KeyOpt=ALL" >
Second Link Value
</a>
</td
My code is
// parse the html into a DOMDocument
$dom = new DOMDocument();
@$dom->loadHTML($html);
/*** discard white space ***/
$dom->preserveWhiteSpace = false;
// grab all the on the page
$xpath = new DOMXPath($dom);
//$hrefs = $xpath->evaluate("/html/body//a[@class='firstLink']");// its working
$hrefs = $xpath->evaluate("/html/body//a[@class='secondLink SecondClass']");// not working
Thank you