I am trying to convert a string to a money format using this function and trying to create something like this:
350000000
to
350.000.000,00
All my attempts have failed so far, being the last:
setlocale(LC_MONETARY, 'pt_PT.UTF-8@euro');
echo money_format('%.2n', $preco);
Any help would be greatly appreciated. Hooray!
source
share