chesneil
05-13-2008, 02:04 PM
A result such as 38,000,000 is output as 3.8E+7. How can I make it output as 38,000,000. Thanks a lot :)
|
||||
How to stop round() displaying result as exponentialchesneil 05-13-2008, 02:04 PM A result such as 38,000,000 is output as 3.8E+7. How can I make it output as 38,000,000. Thanks a lot :) RMcLeod 05-13-2008, 02:38 PM This works <?php $number = 38000000.4 echo number_format(round($number), 0, '.', ','); ?> If you don't actually want the commas as seperators then replace ',' with '' chesneil 05-14-2008, 12:49 PM Fantastic! Thanks very much. |
| |||
EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum