php与smarty的难点

php与smarty的难题php脚本有变量: $name fangxinsmarty模版中:{php}这里怎么引用脚本中的变量name呢?

php与smarty的难题
php脚本有变量: $name = 'fangxin';

smarty模版中:
{php}这里怎么引用脚本中的变量name呢?{/php}



下面的写法取不到值。
{php}
echo $name;
{/php}
[解决办法]
建议你在php里面处理好了再传递给smarty