0
我想分塊大數。例如。在一組三個塊中分塊大數字php
//between each three decimals a dot should be placed
33 thousand like this 33.000
33 milion like this 33.000.000
我該如何在PHP中做到這一點?
我想分塊大數。例如。在一組三個塊中分塊大數字php
//between each three decimals a dot should be placed
33 thousand like this 33.000
33 milion like this 33.000.000
我該如何在PHP中做到這一點?
number_format(
$number,
0, //amount of decimal points
',', //decimal seperator
'.' //thousands seperator
);
下面是一個例子:
number_format("33000",0,"",".");
number_format("33000000",0,"",".");
見[number_format](http://php.net/manual/en/function.number-format.php) –