I am making a web application.
One thing is needs to do is get the time of day
so it can say for example in the evening:
"Good Evening, User"
I have tried an if statement:
It doesn't work.
Does anybody know how I could make it work.
One thing is needs to do is get the time of day
so it can say for example in the evening:
"Good Evening, User"
I have tried an if statement:
PHP:
function timeofday(){
if ($Time <= "5:00 PM") {
return "Evening";
}else{
if ($Time <= "12:00 PM") {
return "Afternoon";
}else{
if ($Time <= "5:00 AM") {
return "Morning";
}
}
}
It doesn't work.
Does anybody know how I could make it work.