I want the background color to change based on the if statement. For example in the morning I want the color to be blue. How would I do this. I have googled this and everything I find is very confusing. Please help me and explain what you did. Remember when someone is learning do not assume they know what you are talking about.
To often books want to show you just a piece of code and they leave to much out for those of us trying to learn.
<?php $hour = date("H", strtotime("now")); if ($hour >= "5" and $hour < "12" ) echo "Good Morning"; elseif ($hour >=12 and $hour < 18 ) echo "Good Afternoon"; elseif ($hour >=18 and $hour < 22 ) echo "Good Night"; elseif ($hour >=22 and $hour < 24 ) echo "Hey Night Owl"; else echo " Hey Night Owl"; ?>