我想在php中将0显示为0.00.NumberFormatter()对此无效


i want to display 0 as 0.00 in php. NumberFormatter() is not working for that

我想在php中将0显示为0.00。NumberFormatter()不适用于该

它不是

NumberFormatter()

使用

 number_format($variable,2);

试试这个:

$var = 0;
echo $outVar = sprintf('%0.2f', $var); //0.00