I need help converting a string that contains a number in scientific notation to a double.
Example strings: \"1.8281e-009\" \"2.3562e-007\" \"0.911348\"
I wa
$float = sprintf('%f', $scientific_notation);
$integer = sprintf('%d', $scientific_notation);
if ($float == $integer)
{
// this is a whole number, so remove all decimals
$output = $integer;
}
else
{
// remove trailing zeroes from the decimal portion
$output = rtrim($float,'0');
$output = rtrim($output,'.');
}