list($value) = every($arr);
echo '<h2 align="center">'.$value.'</h2>' ;
echo'<table border="1" width="100%">';
foreach ($i as $item => $kitem) {
echo '<tr>';
while(list ($key,$value) = every($kitem)){
echo '<td>'.$value.'</td>' ;
}
echo '</tr>';
}
echo '</table>';
};
echo "<h2>" . $key . "</h2>";
echo "<table width='500' border='1'>";
while(list($k,$v)=each($value)){
echo '<tr>';
while(list($kk,$vv)=each($v)){
echo '<td>' . $vv . '</td>';
}
echo '</tr>';
}
echo '</table>';
}
foreach()是专门为数组准备的