Hello mates,
I am trying to show some html code that is loaded from mysql.
<h1>View Clients #<?php echo $model->id; ?></h1>
<?php
$this->widget('zii.widgets.CDetailView', array(
'data' => $model,
'attributes' => array(
'client_name',
'create_date',
array(
'name' => 'created_by',
'value' => CHtml::encode($model->createdBy->realname . " (" . $model->createdBy->username . ") "),
),
'update_date',
array(
'name' => 'updated_by',
'value' =>CHtml::encode($model->createdBy->realname . " (" . $model->createdBy->username . ") "),
),
array(
'name' => 'contact_info',
'value' => $model->contact_info,
),
array(
'name' => 'common_info',
'value' => $model->common_info,
),
),
)); ?>
Here $model->contact_info and $model->common_info contain simple html code but unfortunately it is not interpreted by the browser - i can see the tags and not their representation.
What I am missing?