Código PHP:
<?php
$dias = array("Domingo","Lunes","Martes","Miercoles","Jueves","Viernes","Sábado");
$ddm=0;
$dds=date('w');
echo "<SELECT NAME='Calendario'>";
while ($ddm <= 30)
{
if ($dds <= 6)
{
$dmds .= $dias[$dds];
$dmds .= date('j', strtotime('+'.$ddm.' day'));
$selects .= "<OPTION VALUE='".$dmds."'>".$dmds."</OPTION>";
unset($dmds);
echo $selects;
unset($selects);
$dds++;
}
else
{
$dds = 0;
$dmds .= $dias[$dds];
$dmds .= date('j', strtotime('+'.$ddm.' day'));
$selects .= "<OPTION VALUE='".$dmds."'>".$dmds."</OPTION>";
unset($dmds);
echo $selects;
unset($selects);
$dds++;
}
$ddm++;
}
echo "</SELECT>";
?>