2
I’m having trouble with the job number_format
PHP, because my numeral comes from the database with two dots, eg:
1.235.32
I’m using the number_format
thus:
number_format(floatval('1.235.32'), 2, ',', '.');
And he gives it to me:
1.22
I need my result to be formatted like this:
1235,32
Jeez, comes with two points? how is your bank the data type?
– novic
the formatting must be some standard, this format 1.235.32 is not a valid format, if you have no way to fix the input in the database, you will have to replace the point to work the formatting.
– Eduardo Breno
@Virgilio.Novic , Eduardo Really, I was formatting wrong before sending to the database. They think I should delete the question?
– Tales Breno
@Talesbreno perhaps it is better to post now a response from you telling where you were wrong and how you solved the problem.
– novic