hi all
i have two models action and cycle, the relation between them is many to many
a action A1 may be associated to one or many cycles C1, C2…
in the action admin view, i want to display the cycles for the action in cgridview
Action Name cycles
A1 C1
A2 C1,C2
i tried to write the following
$this->widget(‘zii.widgets.grid.CGridView’, array(
'id'=>'action-grid',
'dataProvider'=>$model->search(),
'filter'=>$model,
'columns'=>array(
'Name',
array(
'name'=>'cycles',
'value'=>implode(", " , $model->cycles),
),// 'cycles'
array(
'class'=>'CButtonColumn',
),
),
an error appears: htmlspecialchars() expects parameter 1 to be string, array given
can any one help me how to display it correctly
thank you