Re: Formatting an integer
| From: | Salah Faya | Date: | Wed, 23 Apr 2003 06:45:54 +0000 |
| Subject: | Re: Formatting an integer | ||
| References: | 1 2 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-144959@lists.php.net to get a copy of this message | ||
www.php.net/str_pad
----- Original Message -----
From: "Torsten Ueberschar" <torsten@ueberschar.de>
To: <php-general@lists.php.net>
Sent: Tuesday, April 22, 2003 6:47 PM
Subject: [PHP] Re: Formatting an integer
> Hi, have you tried to use printf or sprintf ?
>
> Torsten
>
> "Beoi 7308" <beoi.7308@cpam-tourcoing.cnamts.fr> schrieb im Newsbeitrag
> news:3EA53EBE.62C92A31@cpam-tourcoing.cnamts.fr...
> > Hi list,
> >
> > I have an integer i would want to print as say 001, 002, ..., 010, etc
> > ...
> > Is there a function i can use for that or do i have to count the digits
> > of
> > the number and print as many zeroes as i need before the integer ?
> >
> > thanks in advance
> >
> >
>
>
>
> --
> PHP General Mailing List (http://www.php.net/)
> To unsubscribe, visit: http://www.php.net/unsub.php
>
>