I use the following code to cut out a div from a site.
$url = 'http://mypage.com/index.php';
$html = @file_get_html($url);
$GetScore = $html->find('div[class=ismSBValue]',0);
echo $GetScore;
This returns.....
<div class="ismSBValue">
<div> 58
<sub>pts</sub>
</div>
</div>
How do I cut out ONLY the 58 value?
I can do the following...
$GetScore = $html
->find('div[class=ismSBValue]',0)
->find('div',0)
->innertext;
to get it down to this....
58
<sub>pts</sub>
Is there some way to exclude the <sub>
tag using simple_html_dom? or am I stuck to using str_replace()
or strpos()
to cut it further?