I am using domDocument. I am close but need help for the last little bit
I have this html just a snippet below. There are a number of rows. I am trying to get the href.
so far i am doing the following: I can get the table, tr, and td ok , but not sure what to do from there.
Thanks for any help
foreach ($dom->getElementsByTagName('table') as $tableitem) {
if ( $tableitem->getAttribute('class') == 'tableStyle02'){
$rows = $tableitem->getElementsByTagName('tr');
foreach ($rows as $row){
$cols = $row->getElementsByTagName('td');
$hrefs = $cols->item(0)->getElementsByTagName('a');
}
}
}
html snippet:
<table width="100%" border="0" cellspacing="0" cellpadding="2" class="tableStyle02">
<tr>
<td><span class="Name"><a href="bin.php?cid=703&size=0">
<strong>Conference Facility</strong></a></span></td>
<td align="center" nowrap>0.00</td>
<td align="center"> 0 </td>
<td align="center"> </td>
<td align="center"> 0 </td>
<td align="center"> 0 </td>
<td align="center"> 0 - 0 </td>
<td align="center"> Wired Internet, </td>
<td align="center"> </td>
</tr>