All pastes #826052 Raw Edit

Untitled

public text v1 · immutable
#826052 ·published 2007-12-20 23:40 UTC
rendered paste body
$end_time_min = '';

<select name="end_time_min">
<option value=""></option>
<?
for($m=0; $m<=55; $m+=5) {
     if($m == $end_time_min) $selected = "selected"; else $selected = '';
     print("<option value=\"$m\" $selected>".str_pad($m, 2, "0", STR_PAD_LEFT)."</option>");
}
?>
</select>

/*
basically, I want that first option to be the default value, but it always selects 0 instead, I tried using $m === $end_time_min but then it wouldn't select the new value on form reload
*/