
php in_array() 函数检查数组中是否存在某个值,如果存在则返回 true ,否则返回 false。
语法:
bool in_array( mixed needle, array array [, bool strict] )
参数说明:

实例:
立即学习“PHP免费学习笔记(深入)”;
字符 a 在 $arr_a 数组中存在严格检查的例子:
字符 1 在 $arr_a 数组中不存在数组作为 needle 的例子:
数组 $arr_b 在 $arr_a 数组中存在。
推荐教程:PHP视频教程











