title: current years in dropdown select box
body: <p>I have this function for print current year in <code>select box</code> but <code>option value</code> not equal with <code>option text</code>. i.e :current years in selected <code>value</code> is 2013 but <code>html text output</code> is 2012. how to fix this?</p>
  
  <p>PHP:</p>
  
  <pre><code>&lt;select name="year"&gt;
      &lt;?php
      for($i=date("Y")-5;$i&lt;=date("Y");$i++) {
          $sel = ($i == date('Y')) ? 'selected' : '';
          echo "&lt;option value=".$i." ".$sel."&gt;".date("Y", mktime(0,0,0,0,1,$i))."&lt;/option&gt;";
      }
      ?&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Output:</p>
  
  <pre><code>&lt;select name="year"&gt;
      &lt;option value=2008 &gt;2007&lt;/option&gt;
      &lt;option value=2009 &gt;2008&lt;/option&gt;
      &lt;option value=2010 &gt;2009&lt;/option&gt;
      &lt;option value=2011 &gt;2010&lt;/option&gt;
      &lt;option value=2012 &gt;2011&lt;/option&gt;
      &lt;option value=2013 selected&gt;2012&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>