In this tutorial you will learn about the PHP Switch Statement and its application with practical example.
The Switch Statement
The switch statement is simplified form of the nested if … else if statement , it avoids long blocks of if..elseif..else code.
//Block of code to be executed if expression = val1;
//Block of code to be executed if expression = val2;
//Block of code to be executed
//if expression is different
//from both val1 and val2;
Table Of Contents−