This question has already been answered:

I found only how to use standard separators, but I didn’t manage to replace commas with spaces. Here is a sample code.

<?php $a = 999; $b = 10999*$a; echo number_format($b); ?> 

https://eval.in/611658

Reported as a duplicate by members of Visman , andreymal , user194374, Edward , dlarchikov Jan 5 '18 at 22:11 .

A similar question was asked earlier and an answer has already been received. If the answers provided are not exhaustive, please ask a new question .

    1 answer 1

    So:

     <?php $a = 999; $b = 10999*$a; echo number_format($b, 2, ',', ' '); ?> 

    http://php.net/manual/ru/function.number-format.php docks

    • Strange is all))) it was the same that he read, but for some reason he even rounded up something that led me into a stupor) - Evgeny Shevtsov
    • @ YevgenyShevtsov, the second parameter is how many digits after the decimal point it does not round, but cuts off ie now it turns out from the number 1000,2323 1 000,23 if you need more, put the second parameter more. - Naumov