Answers for "convert e-5 to decimal php"

PHP
1

string to decimal php

$num = (double) "10.12";
Posted by: Guest on January-26-2021
0

1.0E-6 to decimal in php

<?php
//Use the exemple below to convert Scientific Notation to float/decimal on PHP:

  echo sprintf('%f', floatval('-1.0E-5'));//default 6 decimal places
  echo sprintf('%.8f', floatval('-1.0E-5'));//force 8 decimal places
  echo rtrim(sprintf('%f',floatval(-1.0E-5)),'0');//remove trailing zeros

?>
Posted by: Guest on August-09-2021

Code answers related to "convert e-5 to decimal php"

Browse Popular Code Answers by Language