Can anyone help me in displaying two column value in a single view? Example: I have two column named unit and department. On my view, I want to display like Unit/Department == Unit1, Department1. Instead of displaying it individually, I would want to just concatenate their value. I believe that it is in _view.php. Any answers are accepted. Thank you ![]()
Hi adrianna
Do you want to concatenate the values in CGridview (or CListView) ?
- In CGridview
...
columns=>array(
array(
'header'=>'Two values',
'value'=>'$data->Unit1 . $data->Department1',
),
)
...
- In _view.php just
echo $data->Unit1 . $data->Department1
Thank you KonApaz.
It works!