title: How to change the select option for a specific interval
body: <p>I want to change the below code to PHP WHILE and get output using PHP code instead of HTML.</p>
  
  <pre><code>&lt;select name="passyear" id="passyear"&gt;
  &lt;option&gt;&lt;/option&gt;
  &lt;option value="2006"&gt;2006&lt;/option&gt;
  &lt;option value="2007"&gt;2007&lt;/option&gt;
  &lt;option value="2008"&gt;2008&lt;/option&gt;
  &lt;option value="2009"&gt;2009&lt;/option&gt;
  &lt;option value="2010"&gt;2010&lt;/option&gt;
  &lt;option value="2011"&gt;2011&lt;/option&gt;
  &lt;option value="2012"&gt;2012&lt;/option&gt;
  &lt;option value="2013"&gt;2013&lt;/option&gt;
  &lt;option value="2014"&gt;2014&lt;/option&gt;
  &lt;option value="2015"&gt;2015&lt;/option&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>Please help me </p>
  
  <pre><code>&lt;select name="passyear" id="passyear"&gt;
  &lt;option&gt;&lt;/option&gt;
  &lt;?php
  $year= date("Y");  
  $i=$year-9 ;
  do{
       echo "&lt;option value='$i'&gt;$i&lt;/option&gt;";
  } 
  while ($i &lt;= $year); 
  ?&gt;
  &lt;/select&gt;
  </code></pre>
  
  <p>What is my mistake ? please help me.</p>