Here is an ASP multiplication table. It displays 10 rows of 10 columb You loop <tr>'s and <td>'s to be displayed in html by the server. Hope this helps, I don't know php, but it should be similar. I'm starting to try and learn php also.
<head>
<title></title>
</head>
<body>
<h1>Times table</h1>
<table border=1>
<%
for row = 1 to 10
Response.Write "<tr>"
for col = 1 to 10
Response.Write "<td>"
Response.Write row * col
Response.Write "</td>"
next
Response.Write "<tr>"
next
%>
</table>
</body>