我需要在网站上使用日历,事情是,周末不应该出现,而且每个月都有不同的日子,
我写了一个基本功能,它有很多缺陷:
<?php
function marcardia () {
$meses = Array(1 => 'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro');
echo "<Select>";
foreach ($meses as $key => $mes){
echo "<option>".$meses[$key]."</option>";
}
echo "</select>";
$dias = range(1,40);
echo "<Select>";
foreach ($dias as $key => $dia){
echo "<option>".$dias[$key]."</option>";
}
echo "</select>";
}
marcardia ();
?>
</p>
<p>Marque uma Hora<br/>
<?php
$horas=array(1 => '09:00', '10:00', '11:00', '12:00', '14:00', '15:00', '16:00', '17:00', '18:00');
$horaz = array();
echo '<select name="hora">';
foreach($horas as $key => $hora){
echo "<option value=\" $hora \"";
echo ">$hora</option> \n";
}
echo '</select>';
?>
我正在学习PHP ...