Date: 09/06/07 (PHP Community) Keywords: mysql, css, sql Most of you are probably already doing this. But you never know.
// odd_even
// marks up table rows odd or even
// returns string to echo
function odd_even ($count) {
if ($count & 1) {
return ' class="odd" ';
} else {
return ' class="even" ';
}
}
And then...
$count = 0;
while ($row1 = mysql_fetch_array ($result1, MYSQL_ASSOC)) {
$count++;
echo ' |