welcomewiki has just posted in the PHP Forum forum of Wiki Newforum under the title of PHP Switch Statement.
This thread is located at http://www.wikinewforum.com/showthread.php?t=5855
Here is the message that has just been posted:
***************
The Switch statement in PHP is used to perform one of several different actions based on one of several different conditions.
*The Switch Statement*
If you want to select one of many blocks of code to be executed, use the Switch statement.
The switch statement is used to avoid long blocks of if..elseif..else code.
*Syntax*
switch (expression)
{
case label1:
code to be executed if expression = label1;
break;
case label2:
code to be executed if expression = label2;
break;
default:
code to be executed
if expression is different
from both label1 and label2;
}
***************