<?php
$ranks = array(
"Alex 1" =>" $team0",
"Alex 2" => "$team1",
"Dave 1" => "$team2",
"Dave 2" => "$team3",
"Grant 1" => "$team4",
"Grant 2" => "$team5",
"Jason 1" => "$team6",
"Jason 2" => "$team7",
"Jessica 1" => "$team8",
"Jessica 2" => "$team9",
"Kevin 1" => "$team10",
"Kevin 2" => "$team11",
"Kris 1" => "$team12",
"Kris 2" => "$team13",
"Mark F 1" => "$team14",
"Mark F 2" => "$team15",
"Mark P 1" => "$team16",
"Mark P 2" => "$team17",
"Tim 1" => "$team18",
"Tim 2" => "$team19",
"Travis 1" => "$team20",
"Travis 2" => "$team21",
"Trevor 1" => "$team22",
"Trevor 2" => "$team23");
ksort($ranks);
foreach($ranks as $key => $val) {echo " ( $key ... $val\n pts ) ";}
?>
すべての結果をエコーするのではなく、上位5つの結果をhtmlテーブルの行にエコーし、各結果を独自の結果にします...