开发者

Concatenation string with variable in smarty

I need in smarty template to transmit to开发者_JS百科 function concatenated string constant with variable value, How can i do it?

some example code: {$obj->calledFunc('string const').$var} but . operator doesn't work


Use the cat modifier:

{$obj->calledFunc('string const')|cat:$var}


You can use concatenation like this:

{'my_string'|cat:$my_variable|cat:'concat_string'}
0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜