Hi Brian,
Regarding your question below....Hmm, I'm not sure about how the first row gets read... could you offer the best way to do this?
Best,
Colin
CODE
<table>
<?php
$i=0;
do {
echo "<tr class=".($i%2==0? '"even"':'"odd"').">";
?>
<SNIP>
<?php $i++;
} while ($row_Recordset1 = mysql_fetch_assoc($Recordset1)); ?>
</table>
[/quote]
Basically you have
do ( <write a row> ) while $row = getnextrow();
How does the first row get read?
A couple of other comments...
* Yes, you have put in a counter to oscillate even-odd. (You might possibly have used a more mnemonic name than i, like evenodd.)
* There's always a decision between making a (part of a) page look like a php program with bits of html scattered through it, or like a bit of html page with php scattered in it. But once you get to a loop like this, I think looking like a program makes it easier to read. It's also a good idea to parameterise on the field names. So you have an outer *row* loop, and an inner *field* loop. If you make an array keyed by the DB field names to the (longer) plain descriptions you use in the table heading you will use the same sort of loop for the headings (<th>) and the data (<td>). Then if you change something, it all updates automatically. (In real life, you _always_ change something eventually.)
[/quote]