Home >Backend Development >PHP Tutorial >,关于按多个条件来调用如何编写

,关于按多个条件来调用如何编写

WBOY
WBOYOriginal
2016-06-13 10:31:58780browse

求助,关于按多个条件来调用怎么编写


我想问的是条件如果很多个呢,比如有1.2.3.4.5

那我应该怎么写啊



这样应该不行的吧

刚从asp转过来,不太懂,望大哥们指教

------解决方案--------------------
if(catid == 1 or catid == 2 ...)


或者 if(in_array(catid, array(1,2,3,4,5,6,7....)))

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn