Skip to content

Instantly share code, notes, and snippets.

Show Gist options
  • Save robbiet480/612365 to your computer and use it in GitHub Desktop.
Save robbiet480/612365 to your computer and use it in GitHub Desktop.
<?php
$year = date("Y");
for ($i = 2050; $i > 1959; $i--){
if($year == $i)
echo "<option value='$i' selected>$i</option>";
else
echo "<option value='$i'>$i</option>";
}
?>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment