here's the html code that I am trying to turn into a dynamic php loop
<td width="55"><a href="javascript:;" onClick="MM_openBrWindow('e1.htm','','width=347,height=525')"><img src="images/etruria/sm_01.jpg" width="54" height="76" border="0"></a></td>
<td width="57"><a href="javascript:;" onClick="MM_openBrWindow('e2.htm','','width=347,height=525')"><img src="images/etruria/sm_02.jpg" width="54" height="77" border="0"></a></td>
<td width="54"><a href="javascript:;" onClick="MM_openBrWindow('e3.htm','','width=347,height=525')"><img src="images/etruria/sm_03.jpg" width="54" height="77" border="0"></a></td>
<td width="54"><a href="javascript:;" onClick="MM_openBrWindow('e4.htm','','width=347,height=525')"><img src="images/etruria/sm_04.jpg" width="54" height="76" border="0"></a></td>
<td width="54"><a href="javascript:;" onClick="MM_openBrWindow('e5.htm','','width=347,height=525')"><img src="images/etruria/sm_05.jpg" width="54" height="76" border="0"></a></td>
<td width="61"><a href="javascript:;" onClick="MM_openBrWindow('e6.htm','','width=347,height=525')"><img src="images/etruria/sm_06.jpg" width="54" height="76" border="0"></a></td>
<td width="61"><a href="javascript:;" onClick="MM_openBrWindow('e7.htm','','width=347,height=525')"><img src="images/etruria/sm_07.jpg" width="54" height="76" border="0"></a></td>
I've been trying to figure it out but there is something wrong with my syntax.
here's my code
<?php
$query2 = ('select * from small_images where page_number = "5"');
$result2 = mysql_query($query2);
$SI_result = mysql_fetch_array($result2);
$num_rows=mysql_num_rows($result2);
?>
<table width="<?php ($num_rows)*60 ?>" border="0" cellspacing="0">
<tr>
<?php
for ($i=0; $i<$num_rows; $i++)
{
<td width="55"><a href="javascript:;" onClick="MM_openBrWindow('e1.htm','','width=347,height=525')"><img src="images/etruria/sm_01.jpg" width="54" height="76" border="0"></a></td>
echo "<td width='60'><a href='javascript:;' onClick='MM_openBrWindow('e($i+1).htm','','width=347,height=525')'><img src='uploads/$SI_result [image +i]' width='54' height='76' border="0"></a></td>"
}
?>
I keep getting a syntax error on my loop code.
can anyone help?
thanks