about 9 years ago
Let's consider the example below using the function sprintf
$result = 3.146124; echo sprintf("%.3f",$result);
output:
3.140
Alternatively, with printf:
$result_rounded = sprintf('%0.2f', $result);
Output
3.14
Starting with Chrome version 45, NPAPI is no longer supported for Google Chrome. For more information, see Chrome and NPAPI (blog.chromium.org).
Firefox and Microsoft Internet Explorer are recommended browsers for websites using java applets.
Chrome Version Support
Are you sure, you want to delete this comment?
Sign up using
0 Comment(s)