I am trying to display a message depending on the time of day between four specific times, and I don't understand my error. Below is my code and my error message.
$curtime = date("h:i:sa");
echo $curtime;
if ($curtime >= 5:45:00am and $curtime =< 11:59:59am){
echo "Good Morning";
}
if ($curtime >= 12:00:00pm and $curtime =< 5:59:59pm){
echo "Good Afternoon";
}
if ($curtime >= 6:00:00pm and $curtime =< 5:44:59am){
echo "Good Evening";
}
Error message:
PHP Syntax Check: Parse error: syntax error, unexpected ':' in your code on line 11