Possible Duplicate:
PHP: Best way to iterate two parallel arrays?
I am using PHP DOMDocument to parse some html data frm a football bet-site.
I have one Xpath searching for the home-team and another searching for the away-team.
When i get the data in the variables $teamHome
and $teamAway
i want to do something like this:
foreach($teamHome as team1)&&($teamAway as team2){
echo $team1->nodeValue . " vs " . $team2->nodeValue . "\n";
}
Is there any way to do it? Thanks