Answers for "php switch with return"

PHP
1

php switch case array

foreach ($array[0] as $key => $value) {
    switch ($key) {
        case 'Products' :
            // do something
            break ;
        case 'customers' :
            // do something
            break ;
        case 'Models' :
            // do something
            break ;
     }
 }
Posted by: Guest on February-24-2021

Browse Popular Code Answers by Language