title: run code depending on the time of day
body: <p>I need to echo some code or message on a page depending on the hour of the day. Just like a welcome message, "good evening", or "good afternoon"</p>
  
  <p>I don't know hot to group certain hours and assign a message to each group like</p>
  
  <p>from 1:00:00 pm to 4:00:00pm = "good afternoon" and from 4:00:01 to 8:00:00 = "good evening"</p>
  
  <p>so far I have :</p>
  
  <pre><code>&lt;?php
  date_default_timezone_set('Ireland/Dublin');
  $date = date('h:i:s A', time());
  if ($date &lt; 05:00:00 AM){
  echo 'good morning';
  }
  ?&gt;
  </code></pre>
  
  <p>But I don't know how to pass the hours range an the messages.</p>