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.
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.
精彩评论