如何在前三个字符后添加一个句点,然后每 3 个字符添加一个 '?
Example
$number = 1100000
Output = 1'100.000
Example2
$number = 560000
Output = 560.000
Example3
$number = 1000256000
Output = 1'000'256.000
我试过 number_format 但它会添加相同的符号(。,')......谢谢!
$number = 1100000;
$english_format_number = number_format($number, 0, '.', "'");
Output: 1'100'000
$number = 1100000;
$english_format_number = number_format($number, 3, '.', "'");
Output: 1'100'000.000
$number = 1100000;
echo chunk_split($number,1,".");
谢谢!!