how can i format a float number, exemple 6099.99, to: 6,099.99 or 6.099,99
i've tried the function number_format()
and money_format()
like this:
number_format(6099.99,2,'.',',')
// output 6,00
setlocale(LC_MONETARY, 'it_IT');
echo money_format('%.2n', $number)
// output 6,00
Thx in advanced