How does php prevent numbers from being displayed as scientific counting
This article introduces how php prevents numbers from being displayed as scientific counting. The content is very detailed. Interested friends can use it for reference. I hope it will be helpful to you.
You can use the formatted number function "number_format ()" in PHP to prevent numbers from being displayed as scientific counting, using methods such as "echo number_format (" 5000000 ", 2,". ");.
This article operating environment: Windows7 system, PHP7.1, Dell G3 computer.
How does php prohibit scientific counting? PHP prevents numbers from being displayed as scientific counting
When you meet scientific notation
The solution is
Use php to format the numeric function: number_format ()
The method of use is as follows:
Echo number_format ("5000000").
"/ / 5000000echo number_format (" 5000000 ", 2)."
"; / / 5000000.00echo number_format (" 5000000 ", 2,". "); / / 5.000.000pr 00
There is also an online chestnut:
/ / for example, echo '1869879738796128 enumerator / default result is: 1.8698797387961E+15 / / solution echo number_format (' 1869879738796128, 0,','); / / output result is: 1869879738796128 on how to prevent the display of numbers as scientific counting, so much for sharing here. I hope the above can be helpful and learn more. If you think the article is good, you can share it for more people to see.