I feel compelled to reiterate once again that I am really not a programmer, but it is so gratifying when I'm able to solve a problem with a bit of code. So, here's the code...any ideas on what this does or what my problem was? If you're good with PHP and see any problems, please let me know!

$calurlyear = date(Y);
$calurlmonth = date(m);
$calurl = ($calurlyear . '/' . $calurlmonth . '/calendar.php');
$i=0;
do {
    $i++;
    $calurlmonth = str_pad($calurlmonth-1, 2, "0", STR_PAD_LEFT);
    if ($calurlmonth < 1){
        $calurlmonth = 12;
        $calurlyear = $calurlyear-1;
        }
    $calurl = ($calurlyear . '/' . $calurlmonth . '/calendar.php');
    if (file_exists($calurl)){
       include $calurl;
       $i = 10;
       }
}
while ($i < 10);