Skip to content
Advertisement

Format 15-digit number PHP

I’m trying to format the following number from a json url.

JavaScript

to

JavaScript

Here is my code

JavaScript

It returns

JavaScript

I’m tying to format the value of totalbc from the api url

Thank you

Advertisement

Answer

You could divide it by 1E8 and use number_format:

JavaScript
User contributions licensed under: CC BY-SA
2 People found this is helpful
Advertisement