我有一些PHP代码来计算两个特定日期之间的天数。差异不应计入星期日和星期六。另外,我有一组日期,其中包括假期,也需要跳过。我将开始日期设为01-05-2015,将结束日期设为01-06-2015。我把5月份的所有日子都作为数组给出。因此,差异应为1天。但我得到的输出为7。问题是什么?这是代码。functiondateRange($first,$last){$dates=array();$current=strtotime($first);$now=$current;$last=strtotime($last);while($current 最佳答案