How to convert small value in PHP like 1.0 E-5 to “normal” view

By | April 16, 2020

Sometimes you might have small numbers in PHP. So small, that they are automatically converted to exponential format. In order to show them as numbers, here is the code:

$number= rtrim(number_format($number, 8), 0);

You’re done!

12 thoughts on “How to convert small value in PHP like 1.0 E-5 to “normal” view

  1. temp mail

    I would argue that someone played a significant role in producing a thoughtful post. Having just visited your website for the first time, I’m astonished at the sheer volume of research you performed to create this specific piece. Excellent effort.

    Reply

Leave a Reply

Your email address will not be published. Required fields are marked *