我如何从 number_format 函数中删除 PHP 中的美分部分
How from number_format function I can remove the cents part in PHP
来自这段代码:
$total = 750;
number_format($total, 2, ',', ' ').'<sup>$</sup>';
我得到 750,00$
。
如何删除 ,00
部分?
谢谢。
要从 result.You 中删除 ,00
必须将您的代码更改为
$total = 750;
number_format($total, 0, ',', ' ').'<sup>$</sup>';
来自这段代码:
$total = 750;
number_format($total, 2, ',', ' ').'<sup>$</sup>';
我得到 750,00$
。
如何删除 ,00
部分?
谢谢。
要从 result.You 中删除 ,00
必须将您的代码更改为
$total = 750;
number_format($total, 0, ',', ' ').'<sup>$</sup>';