📜  php switch case 数组 - PHP 代码示例

📅  最后修改于: 2022-03-11 14:53:54.728000             🧑  作者: Mango

代码示例3
foreach ($array[0] as $key => $value) {
    switch ($key) {
        case 'Products' :
            // do something
            break ;
        case 'customers' :
            // do something
            break ;
        case 'Models' :
            // do something
            break ;
     }
 }