[ask] Repeatable HTML

hello folks :)

I want to create something in yii like

[html]

<div>

<!-- <?php echo $variable; ?> -->

</div>

[/html]

i want to use html above repeatable in another html files using same script, with different $variable value. can yii do this?

thanx before :)

1.use your own function

function getVarHtml($var){

return "<div>

<!-- <?php echo $var; ?> -->

</div>";

}

2.use CController::renderPartial