foreach( $arr as $k => $v ){
echo '<h4>' .$k .'</h4>';
echo'<table width="500" border="1">';
// var_dump( $key );
foreach( $v as $value ){
list($key , $value) = each( $v );
echo '<tr>';
foreach( $value as $vv ){
echo '<td>'. $vv . '</td>';
}
echo '</tr>';
};
echo'</table>';
};
嘻嘻嘻2020-04-29 08:35:40
I always feel that everyone who can write such things is a very good person, and their thinking is quite clear, but I can't write it, my head is all blurred.
海挚2019-01-25 22:01:03
foreach( $arr as $k => $v ){
echo '<h2 align="center">' .$k .'</h2>';//h4字体偏小,另外需要居中
echo'<table width="500" border="1" >';
foreach( $v as $value ){
list($key , $value) = each( $v );
echo '<tr style=text-align:center>';
foreach( $value as $vv ){
echo '<td >'. $vv . '</td>';
}
echo '</tr>';
};
echo'</table>';
};
Gomez 、2017-08-17 15:38:44
$color = ['#FFE4C4','#FF83FA','#FF4040','#FF00FF','#F5F5DC','#EEEE00','#E8E8E8','#DA70D6','#CDC9C9','#912CEE'];
while(list($key,$value) = each($arr)){
echo '<h2 style="width:800px;text-align:center;">' . $key . '</h2>' . '<table style="width:800px;border:1px solid gray;><tbody>';
while(list($ke,$va) = each($value)){
echo '<tr">';
while(list($k,$v) = each($va)){
echo '<td style="text-align:center;" bgcolor='. $color[rand(0,count($color)-1)] .'>' . $v . '</td>';
}
echo '</tr>';
}
echo '</tbody></table>';
}