empty($array_test) //若是数组$array_test为空那么这个函数返回true if($array_test) //若是数组为空.那么if的条件判断为false count($array_test) //计算数组元素个数.为0就是空 sizeof($array_test) //count() 的别名 用法和返回同样 //实际上还有一些方式能够判断数组是否为空.经常使用的就是这些 补充一下 若是数组没有被定义 还可使用 isset($array_test)//判断数组是否被定义