日期格式转换
[PHP]方法:date('Y-m-d', $v['time']);
[SMARTY]方法:{$data.value|date_format:"%Y-%m-%d %H:%M:%S"}

截取字符串:
{ $data.value|truncate:28:'...'}
28个字节14个字数出,多余部分输出…

去除Html标签
[PHP]方法:htmlspecialchars($msg)
[SMARTY]方法:{$msg|strip_tags}

explode函数
{assign var=foo value=", "|explode:$var_to_explode}

换行符替换成
[PHP]方法:nl2br($msg);
[SMARTY]方法:{$msg|nl2br}

相关文章:

  • 2021-11-23
  • 2022-12-23
  • 2022-12-23
  • 2022-12-23
  • 2021-11-23
  • 2022-12-23
  • 2021-06-04
猜你喜欢
  • 2022-02-21
  • 2021-07-14
  • 2021-11-09
  • 2022-12-23
  • 2021-12-13
  • 2022-12-23
  • 2021-07-16
相关资源
相似解决方案