How to display an array data in a single line in CDetailView

The code:

[font="Courier New"]<?php $this->widget('zii.widgets.CDetailView', array(


'data'=>$model,


'attributes'=>array(


            'tag',  // problem here


   ),


)); [/font]

If there is an array in the attribute "tag" in this model ($model->tag), how can I display all items in the array?

The attribute ‘tag’ has an array like this:

[font=“Courier New”] $model->tag = array(‘A’, ‘B’, ‘C’, ‘D’);

[/font]

I want this result:

Tag: A, B, C, D




$this->widget('zii.widgets.CDetailView', array(

  'data'=>$model,

  'attributes'=>array(

    array(

      'name' => 'tag',

      'value' => implode(', ', $model->tag)

    )

  ),

)); 



It’s work! Thanks!

Thank you for this.