PHP Switch Statement
Conditional statements are used to perform different actions based on different conditions.
The PHP Switch Statement
Use the switch statement to select one of many blocks of code to be executed.Syntax
switch (n) { case label1: code to be executed if n=label1; break; case label2: code to be executed if n=label2; break; default: code to be executed if n is different from both label1 and label2; } |
Example
|
3:20 AM
case conditional statement, if condition, PHP, php conditional statement, php switch, switch statement
0
0 comments:
Post a Comment