2010/07/22 2034 Views
语法: int is_array(mixed var);
返回值: 整数
内容说明: 若变量为数组类型则返回 true,否则返回 false。
实例:
<?php
$colors = array("red", "blue", "green");
if(is_array($colors)){
print("colors is an array");
}else{
print("Color is not an array");
}
?>
$colors = array("red", "blue", "green");
if(is_array($colors)){
print("colors is an array");
}else{
print("Color is not an array");
}
?>
Leave a comment