I have this value: 47830,60
I want to leave 47.830,60
. For this I used the function number_format
like this:
number_format($valor,2,",",".");
But I get this error:
A well-formed numeric value encountered
Note: I've tried a cast float
but it's zeroing the cents.