Never mind i have solved it now

And here is the script if any one elsa want it.
<?php
$teams = array("Team A","Team B","Team C","Team D","Team E", "Team F", "Team G", "Team H");
$n = count($teams); // Number of teams
if ($n %2 != 0) { $n++; $ghost = $n;}
$rounds = $n-1; // Number of rounds, single is $n-1 double is ($n-1)*2
echo "<pre>";
for ($r = 1; $r <= $rounds ; $r++) {
$matches = "";
for ($i = 1; $i <= $n / 2; $i++)
{
$hometeam = ($i==1)? 1 : (($r+$i-2) % ($n-1) +2);
$awayteam = ($n - 1 + $r - $i) % ($n -1) +2 ;
if ($r %2) {
$swap = $hometeam;
$hometeam=$awayteam;
$awayteam = $swap;
}
if (($hometeam!=$ghost) && ($awayteam!=$ghost)) {
$matches .= sprintf ("%s - %s<br>", $teams[($hometeam-1)], $teams[($awayteam-1)]);
}
}
printf("<b>%Round %3d :</b><br><br>$matches<br><br>\n", $r);
}
echo "</pre>\n";
?>
Enoy
//Marko