View Full Version : How to stop round() displaying result as exponential
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 :)
05-13-2008, 02:38 PM
$number = 38000000.4
echo number_format(round($number), 0, '.', ',');
If you don't actually want the commas as seperators then replace ',' with ''
05-14-2008, 12:49 PM
Fantastic! Thanks very much.
Powered by vBulletin® Version 4.2.2 Copyright © 2016 vBulletin Solutions, Inc. All rights reserved.