View Single Post
Old 04-12-2004, 10:08 PM   #2 (permalink)
drokulix
Registered User
 
Join Date: Apr 2004
Location: Eaton IN USA
Posts: 1
drokulix is on a distinguished road
Another example

Another thing you can do is declare an array of background colors and cycle through them automatically, like so:

PHP Code:
<table border='0'>

<?php

$num 
20;

$colors = array('#ff9999','#99ff99','#9999ff');

for(
$i=0$i<$num$i++) {
    
$bgcolor $colors$i count($colors) ];
    echo 
"<tr bgcolor='$bgcolor'><td>This is line number $i</td></tr>";
}

?>

</table>
drokulix is offline   Reply With Quote