Hi,
I am retrieving a recordset from a simple database table of two fields.
Within the recordset I want to display a
sequential number within the html for each row in the recordset, for example
Image1
Image2
Image3
etc.
This is because each row contains javascript mouseover images and they need a unique number.
To make things clearer I have listed my code below and made bold where I want the sequential number to appear....
Code:
<?php do { ?>
<tr>
<td width="125" class="bodycopy"><?php echo "<a href=products_subcategory.php?subcatid=".$row_result['subcatid'].">".$row_result['subcatname']."</a>"; ?></td>
<td width="35" valign="top" align="left"><a href="#" target="_blank" onMouseOver="MM_swapImage('Image1','','/images1/arrow1.jpg',1)" onMouseOut="MM_swapImgRestore()"><img src="/images1/arrow.gif" name="Image1" width="15" height="15" border="0"></a></td>
<td width="374"> </td>
</tr>
<tr>
<td colspan="3"> </td>
</tr>
<?php } while ($row_result = mysql_fetch_assoc($rs_result)); ?>
Any help would be much appreciated :)