Vedi se può esserti utile questo scriptino molto semplice che ho realizzato modificando uno di quelli postati:
Codice PHP:
<?php
$giornosettimana = array ("Domenica",
"Lunedi",
"Martedi",
"Mercoledi",
"Giovedi",
"Venerdi",
"Sabato");
$nomemese = array(1 => "Gennaio",
"Febbraio",
"Marzo",
"Aprile",
"Maggio",
"Giugno",
"Luglio",
"Agosto",
"Settembre",
"Ottobre",
"Novembre",
"Dicembre");
//Definisco il giorno, il mese e l'anno in cui mi trovo
$theDate = getdate();
$mon = $theDate["mon"];
$month = $theDate["month"];
$year = $theDate["year"];
$thisDay = date('l');
$giorno = date("j");
$mese = date("n");
$settimana = date("w");
echo "<span class='Stile1'>".$giornosettimana[$settimana].","." ".$giorno." ".$nomemese[$mese]." ".$year."</span>
";
?>
<table>
<tr bgcolor="#cccccc">
<td width=100>[b]Lunedì[/b]</td>
<td width=100>[b]Martedì[/b]</td>
<td width=100>[b]Mercoledì[/b]</td>
<td width=100>[b]Giovedì[/b]</td>
<td width=100>[b]Venerdì[/b]</td>
<td width=100>[b]Sabato[/b]</td>
<td width=100>[b]Domenica[/b]</td>
</tr><tr bgcolor="#eeeeee">
<?php
//Primo giorno del mese
$firstday = getdate(mktime(0,0,0,$mon,1,$year));
$numero =$firstday['wday'];
//Vedo di quanti giorni è composto il mese
$cont = true;
$tday = 27;
while (($tday <= 32) && ($cont)) {
$tdate = getdate(mktime(0,0,0,$mon,$tday,$year));
if ($tdate["mon"] != $mon) {
$lastday = $tday - 1;
$cont = false;
}
$tday++;
}
if ($numero>1) { //Se il mese non inizia da Lunedì inserisco delle colonne vuote
for ($a=1; $a<$numero; $a++)
{
echo "<td></td>";
}
}
for ($i=1; $i<($lastday+1); $i++)
{
$my_num = $numero+$i;
if (is_int(($my_num-1)/7)){
echo "<td>".$i."</td></tr><tr bgcolor='#eeeeee'>";
} else{
echo "<td>".$i."</td>";
}
}
?>
ciao