在PHP中,尝试 number_format
:
$n = 1234.5678;// Two decimal places, using '.' for the decimal separator// and ',' for the thousands separator.$formatted = number_format($n, 2, '.', ',');// 1,234.57
欢迎分享,转载请注明来源:内存溢出
在PHP中,尝试 number_format
:
$n = 1234.5678;// Two decimal places, using '.' for the decimal separator// and ',' for the thousands separator.$formatted = number_format($n, 2, '.', ',');// 1,234.57
欢迎分享,转载请注明来源:内存溢出
评论列表(0条)