Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
$a=4; $check=array(1,2,3,4,5....); if($a==$check[0] || $a==$check[1]...){echo "Match";}else{echo "Not Match";}
数値が一致するかどうかを確認するには、パラメーター内にループを作成する必要があります。
数値配列は非常に長くなる場合があります。これを行う方法はありますか?
in_array関数が必要です:if(in_array($a, $check))
if(in_array($a, $check))