Is there a way to populate a select box in a form with the numbers 1 through 100 using a loop? Thanks.
I don’t really understand what you want to do… Maybe something like this?
<select>
<?php
for ($i = 1;$i < 101;$i++)
{
echo "<option>$i</option>";
}
?>
</select>
Or another way (not so good):
<select>
<?php
$i = 1;
while ($i <= 100)
{
echo '<option>' . $i++ . '</option>';
}
?>
</select>
<select><option>
<?php echo implode("<option>", range(1, 100));?>
</select>