in_array in_array() 函数在数组中搜索给定的值。 <?php $people=array("how","are",you"); if(in_array("how",$people)) {echo "match how!";} ?>