is_arrayとは
is_array()
= ()の中の引数が変数か配列か判定する関数。
変数が配列の場合「true」、配列ではない場合「false」が返される。
$number = array( 1,2,3,4); //array()で配列を作成
if(is_array($number) ){
print '$numberは配列です。'; //true時の処理
} else{
print '$numberは配列ではありません。'; //false時の処理
}
↓ //出力結果
$numberは配列です。
参考元はこちら
(https://www.php.net/manual/ja/function.is-array.php)
(https://php-beginner.com/function/var/is_array.html)