Ive found myself drilling down through xml feeds quite allot, they are almost identical feeds apart from a couple of array names.
Ideally id want to make a sort of function that i can call, but i have no idea how to do it with this sort of data
//DRILLING DOWN TO THE PRICE ATTRIBUTE FOR EACH FEED & MAKING IT A WORKING VAR
$wh_odds = $wh_xml->response->will->class->type->market->participant;
$wh_odds_attrib = $wh_odds->attributes();
$wh_odds_attrib['odds'];
$lad_odds = $lad_xml->response->lad->class->type->market->participant;
$lad_odds_attrib = $lad_odds->attributes();
$lad_odds_attrib['odds'];
as you can see they are essentially the very similar, but im not quite sure how i can streamline the process of setting a working var without writing 3 lines each time.