PHP教程 is_array()函数的使用
1、新建一个205.php,如图所示:

4、is_array()函数的作用:检测变量是否是一个数组,如图所示:

6、使用 is_array() 和 if 语句判断$colors 是否是数组,代码: if(is_array($colors)) { print("colors 是一个数组"); }else{ print("colors 不是一个数组"); }

7、至此,本教程结束!
1、新建一个205.php,如图所示:
4、is_array()函数的作用:检测变量是否是一个数组,如图所示:
6、使用 is_array() 和 if 语句判断$colors 是否是数组,代码: if(is_array($colors)) { print("colors 是一个数组"); }else{ print("colors 不是一个数组"); }
7、至此,本教程结束!