Re: for loop inside a switch

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

 



On Fri, 2007-08-31 at 15:56 -0700, Dan wrote:
> Sanjeev is right.  You're thinking about the problem backwards.  You're 
> trying to build a Switch inside a loop.  Remember, if you ever have to do 
> some operating multiple times you're using a forloop, then the thing that 
> you want to repeat(switch case) is INSIDE the for loop.

Not always true. Sometimes once you've made the switch it applies to all
members of a data array. In which case switching on every iteration is a
waste of processor since you can check a single time outside the loop.

Cheers,
Rob.
-- 
...........................................................
SwarmBuy.com - http://www.swarmbuy.com

    Leveraging the buying power of the masses!
...........................................................

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