Answers for "php can i use 2 variables in switch condition"

PHP
3

php switch 2 variables

switch ([$color, $size]) {
    case ['blue', 'small']:
        echo 'blue and small';
    break;

    case ['red', 'large'];
        echo 'red and large';
    break;
}
Posted by: Guest on November-16-2020

Code answers related to "php can i use 2 variables in switch condition"

Browse Popular Code Answers by Language