Jump to content

[SOLVED] incrementing by 5 help


dennismonsewicz

Recommended Posts

Say Please ;)

 

<?php 
for($i=5; $i<=50; $i+5) 
{
   echo '<option value="' . $i . '">' . $i . '</option>';
}
?>

Should work, if not then do

<?php 
$i = 5;
while($i <= 50)
{
   echo '<option value="' . $i . '">' . $i . '</option>';
   $i += 5;
}
?>

 

Archived

This topic is now archived and is closed to further replies.

×
×
  • Create New...

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.