PHP switch Keyword

PHP Keywords : Choose a message to display based on the value of a variable

Definition and Usage

The switch keyword is used to create a switch conditional.

Switch conditionals choose a block of code to run based on the value of an expression.

Related Pages

The break keyword.

The case keyword.

The default keyword.

Read more about switch conditionals in our PHP switch Statement Tutorial.

❮ PHP Keywords