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!

Leave a Reply

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