Simply copy this and save as cal.php. you will get a calender for the corresponding month you select.
<?PHP
$first_date = mktime(12,0,0,2,23,2005);
$second_date = mktime(12,0,0,2,27,2005);
$offset = $second_date-$first_date;
$noofdays= floor($offset/60/60/24);
if($noofdays==0){
$hours=8;
}
else{
$hours=$noofdays * 8;
}
echo $hours ."<br>". $noofdays;
$month=date("m");
$year=date("Y");
$num = cal_days_in_month(CAL_GREGORIAN,$month,$year ); echo "<br>There was $num days in $month $year";
echo "<br>";
echo" <table>";
for ($i=1;$i<=$num; )
{
echo"<tr>";
for($j=0;$j<7 & $i<=$num;$j++)
{
echo" <td>";
echo $i . " ";
$i++;
echo" </td>";
}
echo"</tr>";
}
echo" </table>";
?>