thinkphp条件判断

浏览:3160 发布日期:2014/08/30 分类:求助交流 关键字: for循环报错了

public function zanid(){
$contant=$_POST['id'];

for(var $i=0;$i<count($contant);$i++){
$tea=D('Zan');
$where['cid']=$contant[i];
$where['uid']=$_SESSION['nickname'];
$result=$rea->where($where)->select();
if($result){echo true;}else{echo false;}
}


}
其中post过来的是一个数组,我想依次循环出中间的id值,但是一直报错,可以帮忙找找为什么啊???
最佳答案
评论( 相关
后面还有条评论,点击查看>>