RE: [PHP] Zerofill
| From: | Rudolf Visagie | Date: | Mon, 30 Dec 2002 11:35:04 +0000 |
| Subject: | RE: [PHP] Zerofill | ||
| Groups: | php.general | ||
| Request: | Send a blank email to php-general+get-129649@lists.php.net to get a copy of this message | ||
http://www.php.net/manual/en/function.str-pad.php
or
use sprintf, e.g.
$formatted = sprintf("%012.2f", $value);
pads $value up to 12 digits to the left with zero's.
-----Original Message-----
From: Cesar Aracena [mailto:icaam@icaam.com.ar]
Sent: Monday, December 30, 2002 12:22 PM
To: php-general@lists.php.net
Subject: [PHP] Zerofill
Hi all,
Sorry to bother you all, but I need something I haven't used in quite a
long time. Dows anyone remembers the PHP function to fill a number with
zeros until it reaches a desired length?
Thanks in advance,
Cesar L. Aracena
icaam@icaam.com.ar
caracena@infovia.com.ar
(0299) 156-356688
Neuquén (8300) Capital
Argentina
--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php