Suppose I have a code of CDetailView as shown in below
$this->widget('zii.widgets.CDetailView', array(
'data'=>$model,
'attributes'=>array(
'title',
'owner.name',
'description:html',
array(
'label'=>'City',
'type'=>'raw',
'value'=>'', // ??? How to insert here ListData function that it will display list of different cities
),
),
));
Now in above code I want to insert the list of cities which is coming in list Data array.
$list = CHtml::listData($model->city, "city_id", "cities");
If i keep $list
in print_r()
. It gives out as in below.
Array ( [1] => London [2] => Paris [3] => New York )
Any Help Will be appreciated.
Thanks.