Blogger Information
Blog 250
fans 3
comment 0
visits 321792
Popular Tutorials
More>
Latest Downloads
More>
Web Effects
Website Source Code
Website Materials
Front End Template
数组函数:in_array()的用法
梁凯达的博客
Original
929 people have browsed it

 //in_array()
 //函数用于检测数组中是否存在内容,存在返回true,不存在则返回false
 //参数值为:in_array('检测内容',$数组名)

-


实例

 
 $arr = array(1,2,3,4,5,6,7);
 var_dump(in_array(1,$arr));
 echo '<hr />';
 //用自定义函数完成这个功能
 //获取了一个变量为数组

运行实例 »

点击 "运行实例" 按钮查看在线实例

 //函数用于检测数组中是否存在内容,存在返回true,不存在则返回false
 //参数值为:in_array('检测内容',$数组名)

Statement of this Website
The copyright of this blog article belongs to the blogger. Please specify the address when reprinting! If there is any infringement or violation of the law, please contact admin@php.cn Report processing!
All comments Speak rationally on civilized internet, please comply with News Comment Service Agreement
0 comments
Author's latest blog post