I'm trying to scrape a webpage using phpsimpledom.
$html = '<div class="namepageheader">
<div class="u">Name: <a href="someurl">Noor Shaad</a>
<div class="u">Age: </div>
</div> '
$name=$html->find('div[class="u"]', 0)->innertext;
$age=$html->find('div[class="u"]', 1)->innertext;
I tried my best to get text from each class="u"
but it didn't work because there is missing closing tag </div>
on first tag <div class="u">
. Can anyone help me out with that....