Re: A 5 digit question
| From: | Brent Baisley | Date: | Fri, 16 May 2003 17:07:43 +0000 |
| Subject: | Re: A 5 digit question | ||
| References: | 1 | Groups: | php.general |
| Request: | Send a blank email to php-general+get-147932@lists.php.net to get a copy of this message | ||
Perhaps you're looking for the str_pad() function?
str_pad($n,5,'0',STR_PAD_RIGHT);
On Friday, May 16, 2003, at 12:39 PM, zavaboy wrote:
How can I make a number less than 5 digits into 5 digits by adding zeros to the end of the number? e.g. // Input: $n = 246; // Output: 24600 I'm somewhat new to PHP... I just joined this newsgroup too! Thanks in advance! -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- Brent Baisley Systems Architect Landover Associates, Inc. Search & Advisory Services for Advanced Technology Environments p: 212.759.6400/800.759.0577