开发者

How to get a variable value from tpl file in php file

I have variable in tpl file as {as开发者_开发技巧sign var="por" value=$product.productid} How can I use that above variable in my php file?

I have tried as:

global $por;

but it not works...Please help me soon.... (note:The variable $por have contains 3 values)


Well, since your smarty variables are PHP variables assigned to the smarty ones before the template has been compiled, the variable should already be somewhere in your PHP code. Look for something like:

$smarty->assign("product", $product);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜