开发者

Concatenation string with variable in smarty

开发者 https://www.devze.com 2022-12-18 14:04 出处:网络
I need in smarty template to transmit to开发者_JS百科 function concatenated string constant with variable value, How can i do it?

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

精彩评论

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