複製代碼<?php $people = array("Peter", "Joe", "Glenn", "Cleveland"); if (in_array("Glenn",$people)){ echo "Match found"; }else{ echo "Match not found"; } ?> Match found