<?php
/**
*
* @authors Your Name ([email protected])
* @date 2017-03-17 19:06:19
* @version $Id$
*/
$info = array(
'user' => array(
array(1, 'zansan', 10, 'nan'),
array(2, 'lisi', 20, 'nv'),
array(3, 'wangwu', 30, 'nan')
),
'score' => array(
array(4, 100, 90, 80),
array(5, 99, 88, 11),
array(6, 10, 50, 88)
),
'connect' => array(
array(7, '110', '[email protected]'),
array(8, '120', '[email protected]'),
array(9, '130', '[email protected]')
)
); foreach ($info as $tableName => $table) {
echo '<table align="center" width="500" border="1">';
echo '<caption><h1>'.$tableName.'</h1></caption>';
foreach ($table as $row) {
echo '<tr>';
foreach ($row as $col) {
echo '<td>'.$col.'</td>';
}
echo '</tr>';
}
echo '</table>';
}