wouldn't this just print empty spaces before the number instead of the
needed Zeros?

-----Original Message-----
From: Martin Towell [mailto:[EMAIL PROTECTED] 
Sent: Thursday, March 20, 2003 1:11 AM
To: 'Harry.de'; [EMAIL PROTECTED]
Subject: RE: [PHP] Zero Fill -> Number Format


sprintf/printf("%7d", $num)

-----Original Message-----
From: Harry.de [mailto:[EMAIL PROTECTED]
Sent: Thursday, March 20, 2003 10:09 AM
To: [EMAIL PROTECTED]
Subject: [PHP] Zero Fill -> Number Format


How can I put out a Zero Fill for numbers
The result should be

$something=26;
echo $something;

e.g.
0000026

I didn't found a solution with number format. Is there any other way?



-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php


--
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to