更改号码串1000000转换为1,000,000
问题描述:
使用PHP我要让我的号码更多的“可读性” ......更改号码串1000000转换为1,000,000
我想修改,例如:
- 10 ... 10(不变化)
- 100将是100(仍然没有改变)
- 1000将是1.000
- 1.000.000将1.000.000
- 十亿将1.000.000.000等
答
$number = 1000000000000.4568;
$str_num = number_format($number, 2, '.', '.');
// $str_num Output
1.000.000.000.000.46
完美谢谢大家。 – james