Re: incrementing in a for loop

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

 



You are correct -- forgive the typo (I forgot the = ).

That is what I get trying to reply to email while eating a burrito and
talking on the phone. LOL
 
<?php
/*

Stephen Johnson c | eh
The Lone Coder

http://www.ouradoptionblog.com
Join our journey of adoption

http://www.thelonecoder.com
stephen@xxxxxxxxxxxxxxxx

continuing the struggle against bad code

*/ 
?>


> From: "M. Sokolewicz" <tularis@xxxxxxx>
> Date: Mon, 12 Sep 2005 23:48:05 +0200
> To: Stephen Johnson <php@xxxxxxxxxxxxxxxx>
> Cc: Peppy <peppy@xxxxxxxxxxx>, <php-general@xxxxxxxxxxxxx>
> Subject: Re:  incrementing in a for loop
> 
> 
>> 
>> 
> 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

-- 
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