Voting

: min(four, eight)?
(Example: nine)

The Note You're Voting On

chris at laflash dot org
18 years ago
Quick HTML menus with minimum and maximum sets of years:

<?php
/*
** Quick HTML menus with minimum and maximum sets of years.
** @author Chris Charlton <[email protected]>
** @license FREE!
*/

// Years range setup
$year_built_min = 1900;
$year_built_max = date("Y");
?>
<select id="yearBuiltMin" size="1">
<?php // Generate minimum years

foreach (range($year_built_min, $year_built_max) as $year) { ?>
<option value="<?php echo($year); ?>"><?php echo($year); ?></option>
<?php } ?>
</select>

<select id="yearBuiltMax" size="1">
<?php // Generate max years

foreach (range($year_built_max, $year_built_min) as $year) { ?>
<option value="<?php echo($year); ?>"><?php echo($year); ?></option>
<?php } ?>
</select>

<< Back to user notes page

To Top