I haven't a clue what PHPquery is, but it looks to be a port of jquery.
I'd say cut the fat out of the PHP and just stick with the dom (since if I had to guess they're using the dom anyway).
If you replace the printf with this:
PHP Code:
$aDisplay = array(
str_replace(' ', '', $team1),
str_replace(' ', '', $team2),
$team1,
$team2);
vprintf('<tr>
<td class="newfixData"><a href="result.php?%s-%s">%s v %s</a></td>
</tr>', $aDisplay);
You end up with this (which is consistent for the first example):
Code:
<tr>
<td class="newfixData"><a href="result.php?Team1-Team2">Team 1 v Team 2</a></td>
</tr><tr>
<td class="newfixData"><a href="result.php?Team3-Team4">Team 3 v Team 4</a></td>
</tr>
So long as the html stays consistent and is always nested as tr::td, then you can retrieve whatever you want from the $children->item(x) where x would be the 0 based td offset for each of the tr's. You can add as you need based on what you choose for the item.