note 6608 deleted from function.printf by felipe
| From: | felipe@php.net | Date: | Sat, 29 Dec 2007 18:17:53 +0000 |
| Subject: | note 6608 deleted from function.printf by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134148@lists.php.net to get a copy of this message | ||
Note Submitter: wtuomela at calpoly dot edu
----
Instead of using the precision function above, you can just use printf's precision for floats.
It's just like C, "%.(precision)f". ex. printf("%.2f", $float); Will print
the variable $float with 2 decimal places.