php implode function is not working

PHP implode function is not working. ????????

public function actionMultiupdate()

{

$this->_model=Test::model()->updateAll(array("User_id"=>0),"id IN (" .implode(",",$_POST["cid"]).")");

$this->redirect(array(‘admin’));

}

I got this error

Description

implode() [<a href=‘function.implode’>function.implode</a>]:

Invalid arguments passed

$_POST["cid"] is null?

var_dump($_POST["cid"])

This is my view file

<?php $this->widget(‘zii.widgets.grid.CGridView’, array(

‘dataProvider’=>$dataProvider,

‘columns’=>array(

‘id’,

array(

‘name’=>‘Action’, ‘value’=>‘CHtml::checkBox(“cid[]”,null,array(“value”=>$data->id,“id”=>“cid_”.$data->id))’,

‘type’=>‘raw’,

‘htmlOptions’=>array(‘width’=>5),

//‘visible’=>false,

),

‘name’,

‘email’,

),

)); ?>

and controller

public function actionMultiupdate()

{

$this->_model=Test::model()->updateAll(array("User_id"=>0),"id IN (" .implode(",",$_POST["cid"]).")");

$this->redirect(array(‘admin’));

}

Can you help me where is the problem?

Check in your controller action if $_POST[‘cid’] is not null.

",$_POST[“cid”] maybe is not an array ,so it hints that Invalid arguments passed :lol: