详解PHP中php switch的方法实例php switchswitch 语句类似于具有同一个表达式的一系列 if 语句。很多场合下需要把同一个变量(或表达式)与很多不同的值比较,并根据它等于哪个值来执行不同的代码。示例<?phpswitch (n){case label1: 1