<?php$sites=array("Google","Runoob","Taobao","Facebook");if(in_array("Runoob",$sites)){echo"找到匹配项!";}else{echo"没有找到匹配项!";}?>
语法
boolin_array(mixed$needle,array$haystack[,bool$strict=FALSE])
时间:2023-12-10 21:35:19
<?php$sites=array("Google","Runoob","Taobao","Facebook");if(in_array("Runoob",$sites)){echo"找到匹配项!";}else{echo"没有找到匹配项!";}?>
boolin_array(mixed$needle,array$haystack[,bool$strict=FALSE])