I'm trying to write a small scraper to do things more automatically,
so far it's been doing the job nearly perfect - i'm missing fallback rules for older pages)
i'll try to explain myself,
currently i'm picking up title with $html->find('h1[class=TitWhite22]')
but some of the pages contain older format where instead of being on class=Titwhite22 it might appear with class=textwhite16 (or any other class for that matter).
my basic function is:
foreach($html->find('h1[class=TitWhite22]') as $element){
$titleName = $element->innertext;
}
how can i set a rule that if the specific class isn't there, it should attempt a different class ?