This should be the easiest thing in the world, but it just does not and WILL not work. I've spent hours and hours on this and I just do NOT understand what's wrong with this code can someone - anyone please please help and explain what I'm doing wrong!? $hour = date('G'); echo "$hour "; if ($hour >= 0 && $hour <= 11) { echo 'Good morning '; } else if ($hour >=12 && $hour <=17) { echo 'Good afternoon '; } else ($hour >=18) { echo 'Good evening '; } All it ever prints out is Good evening! WTF!