Hi All,
I have a site where my pages contents are stored in a database and in most of my views I just use something like
That works fine if the data is html, but if I want to include a Yii construct like
it outputs it literally rather than creating the link.
The only way I've been able to output it correctly is using EVAL, something like this
I have a site where my pages contents are stored in a database and in most of my views I just use something like
echo "$content".
That works fine if the data is html, but if I want to include a Yii construct like
<p>Click the following link ". CHtml::link('careers',array('jobs/list))."</p>
it outputs it literally rather than creating the link.
The only way I've been able to output it correctly is using EVAL, something like this
eval("echo '".$content."';");but wondering if there is a better way to do it rather than using EVAL.