I would use a table to display your table of information. A lot of people refuse to use tables no matter the thing but really a table would handle this perfectly.
<?php
$stats = array(
"Detroit"=>array(
"Stat 1"=> "1000",
"Stat 2"=> "2000",
"Stat 3"=> "3000"
),
"Chicago"=>array(
"Stat 1"=> "4000",
"Stat 2"=> "5000",
"Stat 3"=> "6000"
)
);
echo "<table>";
$heading = "<tr><td> </td>";
$stats_key = array("Stat 1","Stat 2","Stat 3");
$cities = array();
foreach ($stats as $city=>$city_stats){
$cities[] = $city;
$heading .= "<td>" . $city . "</td>";
}
$heading .= "</tr>";
foreach ($stats_key as $key){
$table .= "<tr><td>" . $key . "</td>";
foreach ($cities as $cit){
$table .= "<td>" . $stats[$cit][$key] . "</td>";
}
$table .= "</tr>";
}
echo $heading;
echo $table;