smarty 拼接字符串
smarty 拼接字符串
newstr = [oldstr]|cat:[appendstr]
1 {$name = "Tom"} 2 {$phone = "138123456878"} 3 // 以上变量已定义 4 {$name = $name|cat:"字符串连接符"|cat:$phone} 5 // 经过 该运算 $name = "Tom字符串连接符13812345678"
可多次使用
$name = "a"|cat:"a"|cat:"a"|cat:"a"|cat:"a"|cat:"a"|cat:"a"|cat:"a"|cat:"a"|cat:"a"|cat:"a"|cat:"a"|cat:"a";
| 个人博客: | https://blog.nanshaobit.top |
| CSDN: | https://blog.csdn.net/LZ_nanshao |
| 码云: | https://gitee.com/nanshaobit |
| Github: | https://github.com/nanshaobit |

浙公网安备 33010602011771号