私は次のコードを持っています私はifステートメントに入るために2つのgetを比較しようとしていますが、私はコードに何か問題があります。
時間が23:29を超え、08:10未満の場合は、次のコードを実行する必要があります。
$gettime="04:39"; // getting this from database
$startdate = strtotime("23:29");
$startdate1 = date("H:i", $startdate);
$enddate = strtotime("08:10");
$enddate1 = date("H:i", $enddate);
//this condition i need to run
if($gettime >= strtotime($startdate1) && $gettime <= strtotime($enddate1))
{
echo"ok working";
}
敬意を表して私を助けてください
ありがとう