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