title: Create select options and get the current values for month and date
body: <pre><code>&lt;select name="year"&gt;&lt;?=options(date('Y'),1900)?&gt;&lt;/select&gt;
  &lt;select name="month"&gt;&lt;?php echo date('m');?&gt;&lt;?=options(1,12,'callback_month')?&gt;&lt;/select&gt;
  &lt;select name="day"&gt;&lt;?php echo date('d');?&gt;&lt;?=options(1,31)?&gt;&lt;/select&gt;  
  </code></pre>
  
  <p>PHP</p>
  
  <pre><code>function options($from,$to,$callback=false)
  {
      $reverse=false;
  
      if($from&gt;$to)
      {
          $tmp=$from;
          $from=$to;
          $to=$tmp;
  
          $reverse=true;
      }
  
      $return_string=array();
      for($i=$from;$i&lt;=$to;$i++)
      {
          $return_string[]='&lt;option value="'.$i.'"&gt;'.($callback?$callback($i):$i).'&lt;/option&gt;';
      }
      if($reverse)
      {
          $return_string=array_reverse($return_string);
      }
  
      return join('',$return_string);
  }
  
  function callback_month($month)
  {
      return date('m',mktime(0,0,0,$month,1));
  }
  </code></pre>
  
  <p>What should i make to get the current month and date in the corresponding dropdowns as starting values, as it is the case with years (2013).</p>