How can I make PHP display a floating point number with 4 digits after the decimal point?
$value = sprintf('%.04f', $value);
or
$value = number_format($value, 4);
How can I make PHP display a floating point number with 4 digits after the decimal point?
$value = sprintf('%.04f', $value);
or
$value = number_format($value, 4);
精彩评论