PHP in_array() 函数

http://www.w3school.com.cn/php/func_array_in_array.asp

in_array(value,array,type)

如果给定的值 value 存在于数组 array 中则返回 true。如果第三个参数设置为 true,函数只有在元素存在于数组中且数据类型与给定值相同时才返回 true。

如果没有在数组中找到参数,函数返回 false。

注释:如果 value 参数是字符串,且 type 参数设置为 true,则搜索区分大小写。

in_array() 函数在数组中搜索给定的值。

原文地址:https://www.cnblogs.com/dami520/p/2543294.html