Convert a string containing a number in scientific notation to a double in PHP

前端 未结 8 1750
伪装坚强ぢ
伪装坚强ぢ 2020-12-25 08:18

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

8条回答
  •  被撕碎了的回忆
    2020-12-25 08:34

    I tried the +1,-1,/1 solution but that was not sufficient without rounding the number afterwards using round($a,4) or similar

提交回复
热议问题