RE: [PHP] Case?

From: Date: Thu, 29 Mar 2001 17:15:17 +0000
Subject: RE: [PHP] Case?
Groups: php.general 
Request: Send a blank email to php-general+get-46125@lists.php.net to get a copy of this message
Yes... switch ($my_variable_to_case) { case "value_1": php-code-here; break; case "value_2": php-code-here; break; default: php-code-here; } It works exactly like c. -----Original Message----- From: acleave [mailto:acleave@mail.uark.edu] Sent: Thursday, March 29, 2001 11:15 AM To: php-general@lists.php.net Subject: [PHP] Case? I have tried the online documentation and it either errors out on me or cannot find anything when I search on case. Can someone tell me if PHP supports case statements (or do I just need to do a series of ifs?) and if so where I can find them detailed in the online docs? Thnaks, Allan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, e-mail: php-general-unsubscribe@lists.php.net For additional commands, e-mail: php-general-help@lists.php.net To contact the list administrators, e-mail: php-list-admin@lists.php.net

« previous php.general (#46125) next »