php计算数组不为空元素个数的方法
更新时间:2014年01月27日 16:23:01 作者:
本文为大家介绍下php计算数组不为空元素个数的方法,需要的朋友可以参考下
复制代码 代码如下:
<?php
$arr = array(
1=>"11",
2=>"22",
3=>"33",
4=>""
);
print_r(count(array_filter($arr)));
?>
相关文章
Windows Server 2008 R2和2012中PHP连接MySQL过慢的解决方法
这篇文章主要介绍了Windows Server 2008 R2和2012中PHP连接MySQL过慢的解决方法,同时对Windows 7和8的本地开发环境也有效,需要的朋友可以参考下2016-07-07
关于php连接mssql:pdo odbc sql server
研究了很久,终于发现:最新的php 5.3.6中php_mssql.dll,php_pdo_mssql.dll都已经不见了。2011-07-07
解决php的“It is not safe to rely on the system’s timezone setti
这篇文章主要介绍了解决php的“It is not safe to rely on the system’s timezone settings”问题的方法,需要的朋友可以参考下2015-10-10


最新评论