PHP how to convert exponential number to string?
I have a number stored in scientific notation
2.01421700079E + 14
I have tried using float, string, int and I cannot get
0201421700079085 from 2.01421700079E + 14
1. echo (float)$awb;
2. echo number_format($awb, 0, '', '');
3. echo (int)$awb;
4. echo (string)$awb;
- 2.01421700079E + 14 = float
- 201421700079085 = number
- 201421700079085 = int
- 2.01421700079E + 14 = string
+3
source to share
2 answers