检查数组中是否存在某个值in_array(value,array,type)

复制代码<?php
$people = array("Peter", "Joe", "Glenn", "Cleveland");
if (in_array("Glenn",$people)){
echo "Match found";
}else{
echo "Match not found";
}
?>
Match found
相关文章
相关标签/搜索