title: Day/night image change
body: <p>I want an image on my website that changes every hour, when its 8AM I want <code>image1.png</code> if it is 9AM I want <code>image2.png</code> if it is 10AM I want <code>image1.png</code> again and this for all hours.</p>
  
  <p>All the hours you can divide by 2 have to be <code>image1.png</code>, else it has to be <code>image2.png</code>.
  I don't know how to do this :S Can someone help?</p>
  
  <p>I tried something like this:</p>
  
  <pre><code>    &lt;?php
  
  date_default_timezone_set("Netherlands/Amsterdam");
  $now = date('G');
  
  if ($now &gt; 7 &amp;&amp; $now &lt; 20) {
      $day=1;
  } else {
      $day =0;
  }
  ?&gt;
  
  if ($day=1){
  echo 'day!';
  }
  else
  {
  echo 'night :(';
  }
  
  ?&gt;
  </code></pre>
  
  <p>But it also dont echo day or night. </p>