Author

Topic: How to show 0.00007942 BTC or similar as it is ? (Read 634 times)

full member
Activity: 689
Merit: 102
Maybe you could try this?

Code:
echo number_format(($varBankRoll/pow(10,8)), 8);

or

Code:
$rounded = round($varBankRoll/pow(10,8));
echo number_format($rounded, 8);

Thank you... seems it has worked. Smiley
hero member
Activity: 784
Merit: 1000
Maybe you could try this?

Code:
echo number_format(($varBankRoll/pow(10,8)), 8);

or

Code:
$rounded = round($varBankRoll/pow(10,8));
echo number_format($rounded, 8);
full member
Activity: 689
Merit: 102
I am running a social gambling site called www.CrazyPonzi.com. At this moment, I am facing a typical problem. The bankroll right now has gone down to 0.00007942BTC. But, PHP is showing it as 7.942E-5BTC, making people think that the bankroll has gone up to 7BTC+. Currently the code I am using to show bankroll is following...

Code:
echo round(($varBankRoll/pow(10,8)), 8);

How do I show this value as it is ?
Jump to: