Number Format PHP

Asked

Viewed 200 times

0

I need to format the number 1000 THOUSAND for 100,0 or 100.0 that is, with a decimal place in PHP.

I tried to number_format but returns 1000.00 or 1,000.00.

  • Eduardo, PHP is returning correctly, since 1000 is equal to 1000,00 or 1,000,00. What you can do, for THIS CASE, is divide by 10 and apply the number_format function.

  • Solved, thank you very much, it was lack of thinking a little. Have a good afternoon!

No answers

Browser other questions tagged

You are not signed in. Login or sign up in order to post.