Re: incrementing in a for loop

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



I've searched online and am unable to find how to increment by more than one in a for loop.

for ($i = 1; $i <= 6; $i++) {

Is it possible to increment $i by 5?

Sure.

for ($i = 1; $i <= 6; $i+=5) {

-philip

--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


[Index of Archives]     [PHP Home]     [Apache Users]     [PHP on Windows]     [Kernel Newbies]     [PHP Install]     [PHP Classes]     [Pear]     [Postgresql]     [Postgresql PHP]     [PHP on Windows]     [PHP Database Programming]     [PHP SOAP]

  Powered by Linux