开发者

Force php to display number as 0.000001 instead of f 1.0E-6

开发者 https://www.devze.com 2023-04-07 17:50 出处:网络
I want to force php to output the number 开发者_StackOverflow中文版as a decimal number, not 1E-6. Is this possible?Use printf: printf(\"%0.6f\", $var); Alternatively, sprintf returns a string rather t

I want to force php to output the number 开发者_StackOverflow中文版as a decimal number, not 1E-6. Is this possible?


Use printf: printf("%0.6f", $var); Alternatively, sprintf returns a string rather than printing directly to the output.

0

精彩评论

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