Hi all i generated table,but it looks like the code is a bit messy,long,how can i do the same with the arrays or loops?
<html>
<head>
<meta charset="UTF-8">
<title></title>
<style>
table{border-collapse: collapse;}
tr th, tr td{border: 1px solid black;}
#resize
{
width :100%;
position: relative;
}
</style>
</head>
<body>
<?php
$numbers = mt_rand(1,100);
$numbers1 = mt_rand(1,100);
$numbers2 = mt_rand(1,100);
$numbers3 = mt_rand(1,100);
$numbers4 = mt_rand(1,100);
$numbers5 = mt_rand(1,100);
$numbers6 = mt_rand(1,100);
$numbers7 = mt_rand(1,100);
$numbers8 = mt_rand(1,100);
$numbers9 = mt_rand(1,100);
$numbers10 = mt_rand(1,100);
$numbers11 = mt_rand(1,100);
?>
<div id="resize">
<table width ="100%">
<tr>
<th>knumber</th>
<th>WP</th>
<th>WD</th>
<th>ID</th>
<th>DV</th>
<th>HC</th>
<th>PR</th>
</tr>
<tr>
<td>K001</td>
<td><pre><?php print_r($numbers);?></pre></td>
<td><pre><?php print_r($numbers1);?></pre></td>
<td><pre><?php print_r($numbers2);?></pre></td>
<td><pre><?php print_r($numbers3);?></pre></td>
<td><pre><?php print_r($numbers4);?></pre></td>
<td><pre><?php print_r($numbers5);?></pre></td>
</tr>
<tr>
<td>K002</td>
<td><pre><?php print_r($numbers6);?></pre></td>
<td><pre><?php print_r($numbers7);?></pre></td>
<td><pre><?php print_r($numbers8);?></pre></td>
<td><pre><?php print_r($numbers9);?></pre></td>
<td><pre><?php print_r($numbers10);?></pre></td>
<td><pre><?php print_r($numbers11);?></pre></td>
</tr>
</table>
</div>
</body>
</html>