Javatpoint Logo
Javatpoint Logo

PHP Switch

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

Syntax

PHP Switch Flowchart

flowchart of switch statement in php

PHP Switch Example

Output:

number is equal to 20
Next TopicPHP For Loop




Help Others, Please Share

facebook twitter google plus pinterest

Learn Latest Tutorials


Preparation


Trending Technologies


B.Tech / MCA