pastebin

Paste Search Dynamic
Recent pastes
starting_year
  1. <?php
  2.     $starting_year = 2017;
  3.     $current_year = date('Y')*1;
  4.     echo '<select name="years">';
  5.     echo '<option>Select</option>';
  6.     do {
  7.         echo '<option value="'.$starting_year.'">'.$starting_year.'</option>';
  8.         $starting_year++;
  9.     }
  10.     while ($current_year >= $starting_year);
  11.     echo '</select>';
  12.  
  13.     ?>
Parsed in 0.013 seconds