Code: Select all
<?php
echo "<table width="100%" border="0" cellspacing="0" cellpadding="0">\n"; // begin master table
echo "<tr>\n"; // begin master table's one and only row
while($row_Recordset1 = mysql_fetch_assoc($Recordset1))
{ // start while loop
$image = $row_Recordset1ї'image']; // define image number for each loop
if($genre = "comedy")
{ // start if loop
echo "<td>\n"; // begin master table column to be repeated by loop
echo "<table width="100%" border="0" cellspacing="0">\n"; //begin sub-table
echo "<tr>\n"; // start sub-table row 1
echo "<A href=backs/$image.jpg><div align="center"><IMG SRC=images/$image.jpg></A></div>\n"; // insert dynamic image
echo "\n"; //end sub-table row 1
echo "\n"; // start sub-table row 2
echo "<br><div align="center">".$row_Recordset1ї'title']."</div>\n"; // insert dynamic text
echo "\n"; // end sub-table row 2
echo "\n"; // sub-table row 3
echo "<br><div align="center">".$row_Recordset1ї'format']."</div>\n"; // insert dynamic text
echo "\n"; // end sub-table row 3
echo "</table>\n"; // end sub-table
echo "</td>\n"; //end master table column
}
}
echo "</tr>\n"; // end master table row
echo "</table>\n"; // end master table
?>