我是 smarty 的新手。
我想知道如何在 Smarty 中删除给定字符串中的所有空白字符?
我有一个像“这是我的字符串”这样的字符串。 输出应该是“thisismystring”。
我该怎么做?
最佳答案
来自 the documentation :
{$YourVariable|replace:' ':''}
关于php - 使用 smarty 从字符串中去除空格,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/12317022/