Home >php教程 >php手册 >Thinkphp 模板中使用自定义函数的方法

Thinkphp 模板中使用自定义函数的方法

WBOY
WBOYOriginal
2016-06-13 09:38:041017browse

1.number_format 

{$number|number_format=2}   千分位,保留两位小数

2.round  

{$number|round=2}   四舍五入保留两位小数

 

Statement:
The content of this article is voluntarily contributed by netizens, and the copyright belongs to the original author. This site does not assume corresponding legal responsibility. If you find any content suspected of plagiarism or infringement, please contact admin@php.cn