sprintf precision modifiers
| From: | Erik Price | Date: | Tue, 05 Mar 2002 22:09:56 +0000 |
| Subject: | sprintf precision modifiers | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-87367@lists.php.net to get a copy of this message | ||
The manual for sprintf
http://www.php.net/manual/en/function.sprintf.php
gives a nice introduction to the idea of the different formatting options. But, the reader is referred to the examples to see the different ways that you can format a number. Is there a better resource than this for formatting codes in sprintf ? I think that the annotations are great, but you shouldn't have to rely on these afterthoughts for your information (I didn't see how I could limit the trailing zeroes until I got to the annotations).
Something tells me that for C programmers, formatting output like this is old hat, but for those of us who are just getting our feet wet in programming, there should be a more exhaustive reference as to what can be done... is there any such reference?
Thanks,
Erik
----
Erik Price
Web Developer Temp
Media Lab, H.H. Brown
pricee@hhbrown.com