title: Populate a Select Box with Years using PHP
body: <p>I would like to fill a select box with year starting from 1950 to the current year. How can I achieve this using PHP? I would not like to use JavaScript for this.</p>
  
  <pre><code>&lt;select&gt;&lt;?php
       $currentYear = date('Y');
          foreach (range(1950, $currentYear) as $value) {
              echo "&lt; option&gt;" . $value . "&lt;/option &gt; ";
  
          }
  ?&gt;
  &lt;/select&gt;
  </code></pre>