Posted by "M. Sokolewicz" on 10/20/85 11:26
Stephen Johnson wrote:
>
> On 9/12/05 12:39 PM, "Peppy" <peppy@foxedge.net> wrote:
>
>
>>for ($i = 1; $i <= 6; $i++) {
>>Is it possible to increment $i by 5?
>
>
> for ($i = 1; $i <= 6; $i+5) {
>
>
that won't work; have you tried it?
Because $i++ assigns the result of $i+1 to $i, while yours does not
assign anything to $i. This means you'll run an eternal loop ;)
to do what you showed, you'll need to change $i+5 to $i=$i+5 or $i += 5
- tul
Navigation:
[Reply to this message]
|