Here's a simple php script and its corresponding output.
<html>
<?php
echo"<table border=1>";
echo"<th>Number</th><th>Column1</th><th>Column2</th>";
for($i=1;$i<=10;$i++){
echo"<tr><td>$i</td><td>data$i</td><td>data$i</td></tr>";
}echo"</table>";
?> </html>
the output of this one would be:
Number | Column1 | Column2 |
---|---|---|
1 | data1 | data1 |
2 | data2 | data2 |
3 | data3 | data3 |
4 | data4 | data4 |
5 | data5 | data5 |
6 | data6 | data6 |
7 | data7 | data7 |
8 | data8 | data8 |
9 | data9 | data9 |
10 | data10 | data10 |
In this program i use a for loop to minimize my codes. if you want make the output more presentable then you could put some attribute to it, like a color, alignment, and also border ..