Hi all, I've been trying to do alternating coloured rows with DW, PHP and Mysql. I've tried following the tutorial on this site plus a few other sthat I've come across but none seem to be working. I gather it has something to do with the fact that DW does a '<?php do {' statement followed by the table info finally follwed by the 'while' statement to perform a repeating region.
I have tried various combinations of code but still nothing....can anyone help?
I have included the code for the table just in case:
<snip>
<table border="1">
<tr>
<td>fieldtitle1</td>
<td>fieldtitle2</td>
</tr>
<?php do { ?>
<tr>
<td><?php echo $row_comp['fieldresult1']; ?></td>
<td><?php echo $row_comp['fieldresult2']; ?></td>
</tr>
<?php } while ($row_comp = mysql_fetch_assoc($comp)); ?>
</table>
</snip>
Cheers,
Shannon