[Solved]Populate a dropdown from 0 to 10 by 0.25 s
Posted: Thu Nov 30, 2006 11:30 pm
Hi all Im trying to populate a dropdown from 0 to 10 by 0.25 s but cant figure out how. Thank you for any help.
Example:
.00
.25
.50
.75
1.00
1.25
And so on until 10
This is what I have worked up so far... It just displays four 00 and then a bunch of blank spaces.
Example:
.00
.25
.50
.75
1.00
1.25
And so on until 10
This is what I have worked up so far... It just displays four 00 and then a bunch of blank spaces.
Code: Select all
<SELECT NAME='ot' SIZE='1'>
<?php
settype( $o, 'double' );
for ($o = 0; $o <= 10; $o = $o + 25) {
echo "<option value='$quarters[$o]'";
if ($o == $TimeOutMinute) { echo " selected='selected'"; }
echo ">$quarters[$o]</option>";
} ?>
</SELECT>