1
I have this value: 47830,60
I want to leave it like this 47.830,60
. For that I used the function number_format
thus:
number_format($valor,2,",",".");
but this error returns to me:
A non well Formed Numeric value encountered
Note: I tried a cast float
but it’s zero pennies.
Change
47830,60
for47830.60
and see if it solves.– Roberto de Campos
Thanks!. Solved and used the
str_replace
to do this– SM_S
You can take advantage and create an answer to your own question, explaining how you solved it and putting the code. So it ends up being a reference for future readers with the same problem.
– Isac