My view file contains this to display the record:
<?php $this->widget('zii.widgets.CDetailView', array(
I usually use:
CHtml::encode(isset($model->status0->status) ? $model->status0->status : '-');
To substitute the value of the interger where it may be presented. If I were to use it in this case it would break the grid continuity.
But in this case, it’s in an array. How do I accomplish this?
I have a table(model) that is related to this model where the values 1=active and 2=inactive are stored.
'value'=>'($data->status==1) ? "Active" : "Inactive"',
Notice the value is wrapped in single quotes and the strings are wrapped in double quotes. (It might be the other way around) but you get the idea.