Re: Splitting a string
| From: | Chris | Date: | Wed, 15 Nov 2006 23:47:57 +0000 |
| Subject: | Re: Splitting a string | ||
| References: | 1 2 3 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-244701@lists.php.net to get a copy of this message | ||
Børge Holen wrote:
Oh this was good. I added a while loop to insert extra strings "0" in front of the number to add if the string is less than 5 chars short.sprintf is your friend here, no need to use a loop. sprintf('%05d', '1234'); -- Postgresql & php tutorials http://www.designmagick.com/