You are here: Re: [PHP] incrementing in a for loop « PHP « IT news, forums, messages
Re: [PHP] incrementing in a for loop

Posted by Stephen Johnson on 10/21/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

 

Navigation:

[Reply to this message]


Удаленная работа для программистов  •  Как заработать на Google AdSense  •  England, UK  •  статьи на английском  •  PHP MySQL CMS Apache Oscommerce  •  Online Business Knowledge Base  •  DVD MP3 AVI MP4 players codecs conversion help
Home  •  Search  •  Site Map  •  Set as Homepage  •  Add to Favourites

Copyright © 2005-2006 Powered by Custom PHP Programming

Сайт изготовлен в Студии Валентина Петручека
изготовление и поддержка веб-сайтов, разработка программного обеспечения, поисковая оптимизация