title: PHP IF else on Time
body: <pre><code>$today=date("d");       # today
  $startdate="14";        # start of advent 14th/13th
  $enddate="25";          # end of advent 24th/25th
  //strtomtime
  ?&gt;
  &lt;!DOCTYPE HTML&gt;&lt;html&gt;&lt;head&gt;&lt;meta charset="utf-8"&gt;&lt;title&gt;Christmas Advant Calendar&lt;/title&gt;&lt;/head&gt;&lt;body&gt;
  
  &lt;div class="adventframework"&gt;
  
      &lt;?php
          /*$i=$startdate;
          while($i&lt;=$enddate)
          {
              echo "&lt;div class='datebox " . $i . "' id='" . $i ."'&gt;";
              echo "Today is the " . $i . "";
              echo "&lt;/div&gt;";
              $i++;
          }*/ 
  
          if ($startdate==$today){
              echo 'today and start date match';
          }
  </code></pre>
  
  <p>The problem is that today is <code>01</code> and yet the script echos: <code>today and start date match</code> when <code>$startdate</code> is 14 - I am supposed to use strtotime I here; where does it go?</p>