摘要: 从数据库中取出值后判断是否为空,这个看起来很简单,只要和null比较一下就可以了,其实不然,if($obj==null){ } 这样写会报错的:Notice: Trying to get property of non-object problem,查了一下发现需要使用下面的写法if (isset($obj)) { echo "This var is set set so I will print."; } 这个isset是做什么的呢?isset函数是检测变量是否设置。格式:bool isset ( mixed var [, mixed var [, ...]] )返回值: 阅读全文
posted @ 2014-03-28 00:19 nd 阅读(17099) 评论(0) 推荐(0) 编辑