Php Encoding Again In Yii

hi , I am using this code to demo my problem. here i not found my output right

$theme->html=" hi  i am  {name}.";

$name= "khajaamin";

    $content = str_replace('{name}','<?php echo $name; ?>',$theme->html);

if i echo $content;

i want output like here "hi i am khajaamin."

as khajaamin is variable into that please help me to get it done.

thank you


[color="#808000"]/* Moved from "General Discussion for Yii 1.1.x" to "General PHP Topics" */[/color]

Hi khajaamin,

$theme->html=" hi i am {name}.";

$name= "khajaamin";

$content = str_replace('{name}', $name, $theme->html);