Follow us on Facebook
Faucibus toroot menuts
PHP Switch Case
If you have more than one task to perform based on different condition then we use switch case.
Use the switch statement to select one of many blocks of code to be executed.
What will happen if we don’t write ‘Break’?
If we don’t write break, it will show matching statement as well as all other statements which is not good. We want the program to show the matching statement and then break the program.