您可以创建一个函数,该函数递归使用strtotime()来计算天数。由于
strtotime("next monday");工作正常。function daycount($day, $startdate, $counter){ if($startdate >= time()) { return $counter; } else { return daycount($day, strtotime("next ".$day, $startdate), ++$counter); }}echo daycount("monday", strtotime("01.01.2009"), 0);希望这是您正在寻找的东西:)



