switch ($value)
{
case 1:
case 2:
echo "the value is either 1 or 2.";
break;
}
This is called “falling through” the case block. The term exists in most languages implementing a switch statement.
More Related Contents:
- PHP switch case more than one value in the case
- Which is Faster and better, Switch Case or if else if?
- php switch case statement to handle ranges
- PHP: two values in the case of Switch? [duplicate]
- Implementing a simple lookup array
- default as first option in switch statement?
- PHP, combine two arrays into a new array [closed]
- Is it possible to use PHP inside Xcode for iOS app development? [closed]
- PHP string replace match whole word
- How to view query error in PDO PHP
- PHP algorithm to generate all combinations of a specific size from a single set
- PHP image upload security check list
- Resetting array pointer in PDO results
- PHP check if file contains a string
- SMTP connect() failed PHPmailer – PHP
- PHP How do I round down to two decimal places? [duplicate]
- Smart pagination algorithm [closed]
- PHP Flush/ob_flush not working
- password_hash returns different value every time
- Can you append strings to variables in PHP? [duplicate]
- Sort Object in PHP
- PHP static variables in double quotes
- PHP see only 20 uploading files at a time
- How to check, if a php string contains only english letters and digits?
- PHP post_max_size vs upload_max_filesize, what is the difference?
- In PHP, how do I check if a function exists?
- Html encode in PHP
- Convert to date format dd/mm/yyyy
- $PATH environment variable for apache2 on mac
- How to return custom error message from controller method validation