are you feeding the script the month somehow? like you know what month you are looking for?
if so... just use an array...
<?
$month = $_GET['month'];
$year = $_GET['year'];
// Find out how many days there are in the month. Factor in leap year.
if ($year%4 == 0)
{
$daysInMonth = array(31, 29, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
}
else
{
$daysInMonth = array(31, 28, 31, 30, 31, 30, 31, 31, 30, 31, 30, 31);
}
?>