OK, well here's a way to do it via javascript:
Code:
<!DOCTYPE html>
<html>
<head>
<title> Week Table Demo</title>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8">
</head>
<body>
<table id="mytable">
<tr>
<td>ROW 1</td><td>ROW 1</td>
</tr>
<tr>
<td>ROW 2</td><td>ROW 2</td>
</tr>
</table>
<script type="text/javascript">
var table = document.getElementById('mytable'),
d = new Date(), y = d.getFullYear(), weeknum = 1, rownum;
while(d.getFullYear() === y){
d.setDate(d.getDate() - 7);
++weeknum;
}
rownum = weeknum % 2;
table.rows[rownum].style.backgroundColor = 'yellow';
</script>
</body>
</html>
I'll have a PHP version in a minute or two.
Bookmarks