Posted by Stephen Johnson on 09/27/33 11:26
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@thelonecoder.com
continuing the struggle against bad code
*/
?>
> From: "M. Sokolewicz" <tularis@php.net>
> Date: Mon, 12 Sep 2005 23:48:05 +0200
> To: Stephen Johnson <php@thelonecoder.com>
> Cc: Peppy <peppy@foxedge.net>, <php-general@lists.php.net>
> Subject: Re: [PHP] 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
[Back to original message]
|