I have a table of data, I want to capture the text inside of the element that immediately follows a element that has a label inside with a title attribute of "label". See the table here:
<table>
<tr>
<th><label title="Country">Country</label></th>
<td>I want to capture this text</td>
</tr>
<tr>
<th><label title="Other">Heading I don't need</label></th>
<td>Cell I don't Need</td>
</tr>
</table>
The only identifiable characteristic I can find is that the td is preceded by a th that has a label inside that has a unique title attribute.
First, I tried it without the label since I know it's going to be the first result for:
$found = $html->find('tr th')->next_sibling();
echo($found[0]);
But that doesn't appear to be the correct usage of next sibling. Can somebody tell me how to correctly use it to get the element that follows a element? Even better if there is someway to incorporate that label with its unique title attribute.