Or
         http://www.php.net/manual/en/function.sprintf.php
or
         http://www.php.net/manual/en/function.printf.php



At 04:45 PM 12/20/01 , Bogdan Stancescu <[EMAIL PROTECTED]> wrote:
>if ($i<10) { $i="0".$i } ? :-)
>
>phantom <[EMAIL PROTECTED]> wrote:
>
> > I would like to format numbers to be a fixed width.
> >
> > I want all numbers to be 2 characters in width to the left of the
> > decimal point.
> >
> > 1 should be 01
> > 2 should be 02
> > 3 should be 03
> >
> > How can I do this?
> >


+------------------------------------------------------------------------+
| Steve Edberg                                      [EMAIL PROTECTED] |
| Database/Programming/SysAdmin                            (530)754-9127 |
| University of California, Davis             http://pgfsun.ucdavis.edu/ |
+---------------------- Gort, Klaatu barada nikto! ----------------------+


-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to