【发布时间】:2018-02-27 10:43:01
【问题描述】:
如何用 PHP 给整数加逗号?
示例: $数字 = 1000 $output_i_want = 10,00
示例 2: $数字 = 10000 $output_i_want = 100,00
【问题讨论】:
-
除以 100 并使用 number_format
-
看起来类似于在 php (stackoverflow.com/a/17780702/3452102) 中添加逗号作为千位分隔符和浮点点
标签: php numbers format decimal comma