In my code I've a scenario like this :
<?php
$start = "03:00:00:am";
$end = "08:00:00:pm";
if($start > $end) {}
?>
I tried with unix timestamp but it didnt worked.
In my code I've a scenario like this :
<?php
$start = "03:00:00:am";
$end = "08:00:00:pm";
if($start > $end) {}
?>
I tried with unix timestamp but it didnt worked.
Try this, I do not think that the am, pm at the end is the correct formatting but with dates you should be able to test them in this way:
$start = strtotime("03:00:00");
$end = strtotime("20:00:00");
if($start > $end) {}
Use this code:
<?php
$start = strtotime("03:00:00");
$end = strtotime("20:00:00");
if($start > $end) {
echo "Yes";
}
else{
echo "No";
}
?>