Given a HTML like this:
(...)
<div class="UserLevel type_2">
<span class="LevelNum">23</span>
</div>
(...)
How to get the 23 as a php var using simple_html_dom given the wanted part is inside the span of class LevelNum
?
Thanks
straight out of Simple HTML DOM documentation, have you tried something like
$something = $object->find('span[class=LevelNum]');
Can you try :
foreach ($html->find('div[class=UserLevel type_2]') as $div);
foreach($div->find('LevelNum') as $element)
echo $element->innertext;