Here is an example of what you want from a project I am working on. Basically, you put the cell data inside a while loop so that the table is create dynamically. Here I am building a table for users waiting approval, but it illustrates the concept.
//select unapproved rows from the users table
$users_select = 'SELECT * FROM users WHERE approved = 0' ;
$users_result = @mysql_query($users_select) or die(mysql_error()) ;
//make sure there are some results
if (mysql_num_rows($users_result) >0) {
//give the fields names
while ($users_row = mysql_fetch_array($users_result)) {
$user_id = $users_row['user_id'] ;
$user_name = $users_row['user_name'] ;
$admin_email = $users_row['admin_email'] ;
$contact_name = $users_row['contact_name'];
$inq_email_1 = $users_row['inq_email_1'];
$inq_email_2 = $users_row['inq_email_2'];
$phone_num = $users_row['phone_num'];
$fax_num = $users_row['fax_num'];
$street_addr = $users_row['street_addr'];
$city = $users_row['city'];
$state = $users_row['state'];
$zip = $users_row['zip'];
$country = $users_row['country'];
$date_registered = $users_row['date_registered'];
$approve = '<a href="approve.php?user_id='.$user_id.'&approve=1">approve</a>';
//build the display block
$display_users .= <<<diplayusers
<tr>
<td>$user_id</td>
<td>$user_name</td>
<td>$admin_email</td>
<td>$contact_name</td>
<td>$inq_email_1</td>
<td>$inq_email_2</td>
<td>$phone_num</td>
<td>$fax_num</td>
<td> $street_addr, $city, $state, $zip, $country </td>
<td>$date_registered</td>
<td>$approve</td>
</tr>
diplayusers;
} // close the while loop
} else {
$display_users = "There are no users to approve." ;
} // close the else statement
Then on the page we use display_users inside table tags like this:
<h2> Users awaiting approval</h2>
<table width="95%" border="1">
<? echo $display_users ; ?>
</table>
Of course, you will need to use your field names and add an ORDER BY to your select statement.
HTH