[PHP] Equivalent of the Basic function SELECT...CASE
Could anyone tell me if there is a PHP equivalent to: SELECT x CASE 1 to 5 {...} CASE ELSE {...} END SELECT Muchos gracias. Robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Equivalent of the Basic function SELECT...CASE
switch {} will do it. http://www.php.net/manual/en/control-structures.switch.php Could anyone tell me if there is a PHP equivalent to: SELECT x CASE 1 to 5 {...} CASE ELSE {...} END SELECT Muchos gracias. Robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- Jim Musil - Multimedia Programmer Nettmedia - 212-629-0004 [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]
Re: [PHP] Equivalent of the Basic function SELECT...CASE
switch( $x ){ case 1: case 2: case 3: case 4: case 5: {...} break; default: {...} break; } py At 05:38 PM 12/6/01 +, Robin McKenzie wrote: Could anyone tell me if there is a PHP equivalent to: SELECT x CASE 1 to 5 {...} CASE ELSE {...} END SELECT Muchos gracias. Robin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED] -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED] To contact the list administrators, e-mail: [EMAIL PROTECTED]