Hi everybody,
I have a problem with my calandar. I want current day in calendar to red. I have try and search but nothing make sense for me. Here is the code where I want to current day in red.
<?php
setlocale(LC_TIME, "fin");
$month = date('n');
$year = date('Y');
$day = date('j');
echo '<table width="70%" border="1" cellspacing="10" cellpadding="0">';
echo "<tr>";
echo "<th></th>";
for ($i=1;$i<=5;$i++)
/*these are weekdays*/
echo "<th>Ma</th><th>Ti</th><th>Ke</th><th>To</th><th>Pe</th><th>La</th><th>Su</th>";
echo "<th>Ma</th><th>Ti</th>";
//echo "</tr>";
echo '<tr>';
for ($i=0; $i<12; $i++) {
//timestamp
$aikaleima = mktime(0,0,0,$month+$i,1,$year);
$dayofweek = date('w', $aikaleima);
$amountofdays = date('t', $aikaleima);
//$empties
$tyhjia = $dayofweek-1;
echo '<td>'.strftime("%B %Y", $aikaleima).'</td>';
//$empties
if ($dayofweek == 0) $tyhjia = 6;
$tyhjia--;
for ($j=-1*$tyhjia; $j<=$amountofdays; $j++) {
echo '<td>';
if ($j>0 && ($i>0 || $j>=date('j'))) echo $j;
else echo ' ';
echo '</td>';
}
echo '</tr>';
}
echo '</table>';
?>
Please help me, Thanks for advance.
:o