PHP switch语句判断字符串包含特定字符串 - youku, qq, qiyi, pptv等 - 代码示例
\u003c?php\n$str = "youku"\n\nswitch($str) {\n\tcase "youku"\n\tcase "qq"\n\tcase "qiyi"\n\tcase "pptv"\n\tcase "letv"\n\tcase "sohu"\n\tcase "wasu"\n\tcase "m1905"\n\tcase "funshion"\n\tcase "migu"\n\tcase "bilibili"\n\tcase "xigua"\n\t echo "包含在指定字符串中"\n\t break\n\tdefault:\n\t echo "不包含在指定字符串中"\n\t break\n}\n?>
原文地址: https://www.cveoy.top/t/topic/pZ5D 著作权归作者所有。请勿转载和采集!