Re: Multiple "if()" statements

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

 



Larry Garfield wrote:

switch is fine if your elseif comparisons are equality based. If they're not equality based, then they don't map to switch as well.

In other words, if you look at a logical ladder as the roots of the tree, as long as each root has the same number of forks (say each fork ends only one way), your fine with a switch. If you have one, however, that has only one condition, and another that has two, then you need an if...elseif logic tree.



--
Online library -- http://pueblonative.110mb.com
138 books and counting.

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