title: PHP: Display message at specific day and time
body: <p>I'm trying to make a script to display specific messages at specific day and time. I've got the script working to display at a specific day and at a specific time, but not the two combined.</p>
  
  <p><strong>How can I make the script display a specific message at mondays between 3pm and 4pm?</strong></p>
  
  <p>Look at the script I made so far;</p>
  
  <pre><code>&lt;?php
  //Messages
  $afternoon = "It's afternoon";
  $evening = "It's evening";
  $night = "It's night.";
  $morning = "It's morning!";
  $friday = "Soon weekend!";
  
  //Get time
  $current_time = date(G);
  //Get day
  $current_day = date(l);
  
  //12PM - 4PM
  if ($current_time &gt;= 12 &amp;&amp; $current_time &lt;= 16) {
  echo $afternoon;
  }
  //5PM - 11PM
  elseif ($current_time &gt;= 17 &amp;&amp; $current_time &lt;= 24) {
  echo $evening;
  }
  //00AM - 05AM
  elseif ($current_time &gt;= 1 &amp;&amp; $current_time &lt;= 5) {
  echo $night;
  }
  //6AM - 11AM
  elseif ($current_time &gt;= 6 &amp;&amp; $current_time &lt;= 11) {
  echo $morning;
  }
  
  //Friday, display message
  if ($current_day == "Friday") {
  echo $friday;
  }
  ?&gt;
  </code></pre>
  
  <p>I appreciate any help I can get!</p>