ecabrera Posted November 17, 2013 Share Posted November 17, 2013 <?php $add = "0.00000001"; $have = "0.00000006"; $have = $have + $add; echo "$have"; ?> i get 7.0E-8 but i want to get .00000007 how do i do that Quote Link to comment Share on other sites More sharing options...
Solution Barand Posted November 17, 2013 Solution Share Posted November 17, 2013 $add = "0.00000001"; $have = "0.00000006"; $have += $add; echo number_format($have, ; //--> 0.00000007 printf('%0.8f', $have); //--> 0.00000007 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.