PHP is_array() 函数
PHP 教程
· 2019-01-31 16:43:33
is_array() 函数用于检测变量是否是一个数组。
PHP 版本要求:PHP 4, PHP 5, PHP 7
语法
bool is_array ( mixed $var )
参数说明:
- $var:要检测的变量。
返回值
如果检测的变量是数组,则返回 TRUE,否则返回 FALSE。
实例
实例
$arr_site = array('Google', 'Codercto', 'Facebook');
if(is_array($arr_site)){
echo '变量 $arr_site 是一个数组';
} else {
echo '变量 $arr_site 不是一个数组';
}
输出结果为:
变量 $arr_site 是一个数组
点击查看所有 PHP 教程 文章: https://www.codercto.com/courses/l/5.html
Don't Make Me Think
Steve Krug / New Riders Press / 18 August, 2005 / $35.00
Five years and more than 100,000 copies after it was first published, it's hard to imagine anyone working in Web design who hasn't read Steve Krug's "instant classic" on Web usability, but people are ......一起来看看 《Don't Make Me Think》 这本书的介绍吧!