note 712 deleted from function.sprintf by felipe
| From: | felipe@php.net | Date: | Sat, 29 Dec 2007 15:49:52 +0000 |
| Subject: | note 712 deleted from function.sprintf by felipe | ||
| References: | 1 | Groups: | php.notes |
| Request: | Send a blank email to php-notes+get-134108@lists.php.net to get a copy of this message | ||
Note Submitter: paolini at kahuna dot sdsu dot edu
Reason: 5
----
Hey folks, don't forget to prefix a precision specifier with a period '.'!
Thus, to print a floating point number,
say $x, with two digits after the decimal point you would write:
printf( "%.2f", $x );