i know this is an artsy fartsy message board ;o) but i need a bit of help with PHP.
I'm printing the results from a table and i need it to display alternate lines in different colours. i know it has something to do with odd and even numbers (i have a numeric reference for each line!) but i don't know how to code it!!
Can anyone help? i know a few of you are PHP gurus!
Thanks muchly!
Andy
(,
Mon 25 Feb 2002, 11:08,
archived)
I'm printing the results from a table and i need it to display alternate lines in different colours. i know it has something to do with odd and even numbers (i have a numeric reference for each line!) but i don't know how to code it!!
Can anyone help? i know a few of you are PHP gurus!
Thanks muchly!
Andy
$counter=0
while (not done all table)
{
$counter++;
if (counter is odd)
{echo "black table line";}
else
{echo "white table line";}
}
see? do you see?
(,
Mon 25 Feb 2002, 11:19,
archived)
while (not done all table)
{
$counter++;
if (counter is odd)
{echo "black table line";}
else
{echo "white table line";}
}
see? do you see?