is_array是一個函式,若變數為數組類型則返回true,否則返回false,
基本介紹
- 中文名:is_array
- 語法:boolis_array(mixed var)
- 函式種類:PHP 系統功能
簡介,實例,
簡介
參考:
is_double()is_float()is_int()is_integer()is_long()is_object()is_real()is_string()
實例
<?php
$colors = array("red", "blue", "green");
if(is_array($colors)){
print("colors is an array");
}else{
print("Color is not an array");
}
?>