good evening all :thumb2:
Im working on a project and i desperate need help. I want to use menu/list in a form and the data in the drodown menu should range from -60 to +60 and
with a .25 between each number. As you can understand i dont want to
input the data manually so i thought of making a loop which auto increment the value and display it dynamically in the menu list.
This is what i got
<?php
//Here i made the loop thingy just to display it on the page
for testing purpose
$i= -60;
$k=0.25;
while ($i!=60) {
$i=$i+$k;
print $i;
print “<br>”;
}
?>
<?php
//Then I tried to implement this somehow with my menulist and i get
the inifinte loop trouble.The below code is example of that
?>
<select name=“number”>
<?php
// Here we display the registered shops in database
do {
?>
<option value="<?php echo $i;?>" selected="selected"><?php echo $i;?></option>
<?php
}
while ($i!=60);
$i=$i+$k;
?>
</select>
I did something similar with retrieving data from a database and that worked easy but this is not, anyone could help me. :tb:
To end I just want to say that you all guys on here rocks.Keep up the good work