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