Reputation: 7653
I have switched to ios and I have a weird problem when the server is displaying small numbers with precision points. So the following number for example:
0.000036
is represented like this when I var_dump it:
3.6E-5
How can I turn off this cause it's confusing to work in this notation?
Update:
I know with number_format I can display the number but in Windows there was no need... Is this some IOS settings that is doing it and can it be turned off?
Upvotes: 0
Views: 798
Reputation: 177
<?php
$num = 0.000036;
echo number_format($num,6);
?>
or, no matter how long the number is it would do it automatically for you
<?php
$num = 0.000036;
$length = strlen($num);
echo number_format($num,$length -1);
?>
Upvotes: 1