I've a table showing 7 days of week created using php function. How can i give different background color to each day in the table. I'm new to this, any and all help would be great.
<?php
for($prev_days = 0 ; $prev_days<7;$prev_days++) {
$curr_date = date('Y-m-d', strtotime(-$prev_days.' days'));
$dayOfWeek = date("l",strtotime(strval($curr_date)));
/*echo $dayOfWeek;*/
?>
<td title="click here to see the files">
<label>
<a onclick="document.getElementById('id01').style.display='block'" class="clr">
<?php echo substr(strval($dayOfWeek),0,3); ?>
</a>
</label>
</td>
<?php
}
?>
.CSSTableGenerator tr:first-child td{
background:-o-linear-gradient(bottom, #005fbf 5%, #003f7f 100%);
background:-webkit-gradient( linear, left top, left bottom, color-stop(0.05, #005fbf), color-stop(1, #003f7f) );
background:-moz-linear-gradient( center top, #005fbf 5%, #003f7f 100% );
filter:progid:DXImageTransform.Microsoft.gradient(startColorstr="#005fbf", endColorstr="#003f7f"); background: -o-linear-gradient(top,#005fbf,003f7f);
background-color:#005fbf;
}
This is the table created : https://i.stack.imgur.com/nLnxP.png