Simple, yet efficient PHP Calendar
<p>i need to have a calendar to use at a website, the thing is, that weekends shouldn't show up, and for each month, having different days, </p>

<p>i wrote a basic function, that has many flaws:</p>

<pre><code>&lt;?php

function marcardia () {
$meses = Array(1 =&gt; 'Janeiro', 'Fevereiro', 'Março', 'Abril', 'Maio', 'Junho', 'Julho', 'Agosto', 'Setembro', 'Outubro', 'Novembro', 'Dezembro');
echo "&lt;Select&gt;";
foreach ($meses as $key =&gt; $mes){
echo "&lt;option&gt;".$meses[$key]."&lt;/option&gt;";
}
echo "&lt;/select&gt;";

$dias = range(1,40);
echo "&lt;Select&gt;";
foreach ($dias as $key =&gt; $dia){
echo "&lt;option&gt;".$dias[$key]."&lt;/option&gt;";
}
echo "&lt;/select&gt;";
}

marcardia ();

?&gt;


&lt;/p&gt;
&lt;p&gt;Marque uma Hora&lt;br/&gt;
&lt;?php

$horas=array(1 =&gt; '09:00', '10:00', '11:00', '12:00', '14:00', '15:00', '16:00', '17:00', '18:00');
$horaz = array();
echo '&lt;select name="hora"&gt;';
foreach($horas as $key =&gt; $hora){

echo "&lt;option value=\" $hora \"";
echo "&gt;$hora&lt;/option&gt; \n";
}
echo '&lt;/select&gt;';
?&gt;
</code></pre>

<p>I am in the process of learning PHP, so your help is very appreciated! Thank you very much guys!</p>
