You are here: Re: [PHP] Unnecessary if statement? Programming technique « PHP « IT news, forums, messages
Re: [PHP] Unnecessary if statement? Programming technique

Posted by David Grant on 12/06/05 17:46

Jared Williams wrote:
> Why not
>
> for ($i = 0; $i < 1000000/100; ++$i)

This involves dividing 1000000 by 100 for each iteration of the loop.
It would be better to test against 10000.

There is also the unwanted side-effect of executing the code on each
hundredth iteration, which is unwanted (as far as I understand the
problem). :)

It would be interesting if Steve could divulge the greater problem that
he is seeking a solution to.

Cheers,

David
--
David Grant
http://www.grant.org.uk/

 

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

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