标签: php formatting floating-point
如何让PHP在小数点后显示4位数的浮点数?
答案 0 :(得分:3)
$value = sprintf('%.04f', $value);
或
$value = number_format($value, 4);