Home > Backend Development > PHP Tutorial > 新手有有关问题求大大们指点一下

新手有有关问题求大大们指点一下

WBOY
Release: 2016-06-13 10:25:12
Original
795 people have browsed it

新手有问题求大大们指点一下
其实应该很简单的问题

就是一个变量

$mac != 1 and 2 and 3 and 4 and 5

$mac == 1 or 2 or 3 or 4 or 5

就是两种假设情况,$mac不等于1到5时 ....
$mac等于1或者2或者3或者4 或者5时....

但是这个要怎么表达呢?

------解决方案--------------------
!in_array($mac,array(1,2,3,4,5));
in_array($mac,array(1,2,3,4,5));

Related labels:
source:php.cn
Statement of this Website
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
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template