Only Show Current & Before Year
<select name="year" id='year' class="form-control">
<option value=""> Select </option>
<?php
$before = 0; // Specify number of "year" selections.
$year = date('Y');
for( $i=4; $i>=$before; $i--)
{
$t = $year - $i;
echo("<option value=\"$t\">$t</option>");
}
?>
</select>
Comments
Post a Comment