Quote:
|
Will the loop have any problems with the submitted number as the condition?
|
Yes, there could be a problem if
$number is less than
$i (or maybe if it's ridiculously big). That's why you should validate
$number's value before using it in the loop. A very simple form of validation would be :
PHP Code:
if($number < 1)
$number = 1;
Which will make the loop run once if $number contained a zero or a negative value.
hope this helps