$todayDateUnix = strtotime(date('Y-m-d H:i:s')); /*If the user is looking at the page and leaves the year at the current year, there will be no yxxx table yet, so the $yearTab should be set to an empty string. This will make it so the current tables will be used instead of the yxxx tables. */ if(!($todayDateUnix >= $startingDate && $todayDateUnix <= $endingDate)){ $yearTab = 'y20' . $year . '_'; echo 'yes' . $yearTab; } else{ $yearTab = ''; echo 'yearTab line 235 ' . $yearTab ; } echo 'startingDate ' . $startingDateFormat . '
'; echo $endingDateFormat . '
'; echo 'startingDate unix ' . $startingDate . '
'; echo 'endingDate unix ' . $endingDate . '
'; echo strtotime(date('Y-m-d H:i:s'));