I am wondering if there is a way to separate thousands with space character.

For example:

$number = 21234.56;
setlocale(LC_ALL, 'pl_PL.utf8');
echo money_format('%i', $number);

is giving me:

21.234,56 PLN

And I want:

21 234,56 PLN

I don't want to make str_replace. I am sure there is a better way.

Edit
Report