By | December 31, 2016

The PHP switch statement is used to perform different actions based on different conditions.


Let us see how it works

We have a variable or expression ‘x’. This expression ‘x’ is checked with value of each case. If there is a match, the block is executed.break is used to prevent code running to next case. When there is no match defaultblock is executed.


Third day of the week

Leave a Reply

Your email address will not be published. Required fields are marked *