Html in a field

Hi,

Quick question, I have an address field being presented in a CDetailView widget (the default crud layout). I’m displaying an address field where I would like to put several parts of the address on multiple lines without it breaking into multiple rows. This is what I want to do in code:


'value'=>$model->address->addressID?$model->address->address1.'<br />'. $model->address->address2.'<br />'.$model->address->city.', '.$model->address->state.' '.$model->address->zip

What I get out of that is Address1<br />Address 2<br />city, state zip. If I look at the source code I get Address1&lt;br /&gt;Address 2&lt;br /&gt;city, state zip.

So somewhere yii is translating the html code in the field to the web safe symbols or whatever they’re called. I tried wrapping the field in a CHtml::encode but that only forced the &lt; and &gt; to be displayed instead of < and >.

Any ideas on how I could get around this?

Thanks,

Nazum

use type as raw

Thank you sir. Worked wonderfully.