for ($x = 0.01;
$x <= 0.99;
$x++) {?>
<option value="<?php echo $x;?>"><?php echo $x;?></option>
<?php
} ?>
Run Code Online (Sandbox Code Playgroud)
这不起作用.
我试图得到一个从.01到.99的十进制循环我花在这上面的时间我可以手动输入:)
你只需要改变这个:
$x++ //Increments the value by 1
Run Code Online (Sandbox Code Playgroud)
对此:
$x = $x + 0.01 //Increments the value by 0.01
Run Code Online (Sandbox Code Playgroud)