I'm using PHP Simple DOM Parser (http://simplehtmldom.sourceforge.net/),
So far I've managed to do what I want with it, however I'm attempting to get some text of the first element with a certain class above another.
My issue is that the divs aren't nested in the area I need to get the information from. Like so:
<div class="day">Sunday<div>
<div class="game">...</div>
<div class="game">...</div>
...
<div class="day">Monday<div>
<div class="game">...</div>
<div class="game">...</div>
...
Each game has a title, time, channels.. So whilst I'm gathering all of that in to my array I want to be able to find the first class="day"
in order to add it to my array.
$html->find('h2.time_head')
is how I'm currently getting the day heads, but I'm not sure how I can match it up to my games, as I'm getting them foreach($html->find('div.blockfix') as $div)
like so.
Any help is appreciated.