What Is Php Switch Case?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
PHP switch case is a construct used to perform a different action based on a set of conditions. It works similarly to an if–else statement, but with the added advantage of being able to evaluate more than one expression at once. The switch case statement is written using the keyword “switch” followed by an expression in parentheses that is compared against the cases, which are statements as well as values you can specify. With each case statement there is also a code block that is executed if the expression matches the case.