Javatpoint Logo

91-9990449935

 0120-4256464

PHP Switch

PHP switch statement is used to execute one statement from multiple conditions. It works like PHP if-else-if statement.

Syntax

Flowchart

flowchart of switch statement in php

Example

Output:

number is equal to 20
Next TopicPHP For Loop