我有兩個時間值如在下面提供日期時間比較
$row2[0]=00:40:00;
$row1[5]=14:00:00;
$time=14:33:00
$time=$row[1];
我正在組合$ ROW2 [0],$ ROW1 [5]如下面
$secs = strtotime($row2[0])-strtotime("00:00:00");
$result = date("H:i:s",strtotime($row1[5])+$secs);
$result=14:40:00
i如果條件使用如圖所示
if($row[1]>$row1[5] && $row[1]<$result)
{
$message=array("status"=>$result);
}
else
{
$message=array("status"=>'');
}
,但我得到"status"=>""
其不正確
我想"status"=>"14:40:00"
請幫助我們獲得正確的出放