您好我收到此错误:警告:strtotime() 期望参数 1 为字符串
当我尝试这样做时:
$holidays = array("2008-12-25","2008-12-26","2009-01-01");
$today = date('Y-m-d');
$ticketDate = date('Y-m-d',strtotime($this->getCreateDate()));
$dayCount = $this->getWorkingDays($ticketDate,$today,$holidays);
$dayToHour = $dayCount * 24;
$horas=$cfg->getGracePeriod();
print_r ($holidays);
我明白了:Array ( [0] => 2008-12-25 [1] => 2008-12-26 [2] => 2009-01-01 )
但是当我更换
$holidays = array("2008-12-25","2008-12-26","2009-01-01");
有了这个:
$holidays = array($cfg->holydays());
我明白了:
Warning: strtotime() expects parameter 1 to be string, array given in file.php on line 262
Array ( [0] => Array ( [0] => 2012-08-21 [1] => 2012-08-20 [2] => 2012-08-10 ) )
你能帮我吗?