Re: Multiple "if()" statements

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

 



On Thu, June 29, 2006 11:07 pm, 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.

Except in PHP which supports:

switch(TRUE) {
  case _boolean_expression_:
  break;
}

So you can have case statements of whatever complexity is appropriate.

-- 
Like Music?
http://l-i-e.com/artists.htm

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