开发者

Forcing output in standard mathematical notation in PHP [duplicate]

This question already has answers here: Why is PHP printing my number in scientific notation, when I specified it as .000021? (7 answers) Closed 9 months ago.

When i do follow following operation echo 456/100000000 i get my output in scientific notation

4.56E-6

I开发者_如何学JAVAs it possible to force the output in standard notation, i.e as 0.00000456


Have a look at this function: http://php.net/manual/en/function.number-format.php


$std =sprintf( "%.8f", 456/100000000 );


echo sprintf("%01.8f",456/100000000);
0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜