Link to home
Start Free TrialLog in
Avatar of christamcc
christamccFlag for United States of America

asked on

Drop Down loading slowly

My php populated drop down loads exceptionally slowly.

The code is in the form.  I also tried to assign it to a variable at the top of the page and then echo the variable at the correct point in the form, but that didn't change the speed.

<select name="year" style="width: 70px;">
                                   	<option>Year</option>  
<?php 
		$current_year = Date("Y");
		$year_dropdown = '';
		$selected = '';
		for ($i = ($current_year - 80); $i <= ($current_year); $i++) {
			if(isset($trimmed['year']) && ($trimmed['year'] == $i)) 
							  $selected = ' selected="selected" ';
			$year_dropdown .= '<option ' . $selected . 'value="'. $i . '">' . $i . '</option>';
		}
?>
</select>

Open in new window


Suggestions on how to speed it up?
ASKER CERTIFIED SOLUTION
Avatar of christamcc
christamcc
Flag of United States of America image

Link to home
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
Start Free Trial