I would like to convert a double like "25695.256" to the scientific notation : "2.5695256E4" in PHP. I've found a lot of PHP function to force decimal format but no function to force scientific format. Have you an idea ?
Best regards
I would like to convert a double like "25695.256" to the scientific notation : "2.5695256E4" in PHP. I've found a lot of PHP function to force decimal format but no function to force scientific format. Have you an idea ?
Best regards
Finnaly I've found. I have to use this code :
echo sprintf("%.". $decimals ."e", $value);
$decimals is the number of decimals to show.