Answers for "php switch case multiple values per line"

PHP
2

php switch case multiple values per line

<?php
switch ($i) {
    case 0:
    case 1:
    case 2:
        echo "i is less than 3 but not negative";
        break;
    case 3:
        echo "i is 3";
}
?>
Posted by: Guest on November-04-2020

Browse Popular Code Answers by Language