title: PHP Dropdown populating years - how to select current year
body: <p>I have this PHP Code that is populating values in a SELECT box for the previous 10 years and the next 10 years.</p>
  
  <pre><code>&lt;select name="fromYear"';
     $starting_year  =date('Y', strtotime('-10 year'));
     $ending_year = date('Y', strtotime('+10 year'));
  
      for($starting_year; $starting_year &lt;= $ending_year; $starting_year++) {
   echo '&lt;option value="'.$starting_year.'"&gt;'.$starting_year.'&lt;/option&gt;';
    }             
   echo '&lt;select&gt;
  </code></pre>
  
  <p>how can I make it automatically select the current year?</p>