in reply to Padding out strings.
Here's how you could use sprintf();
$value = 193; # Want 6 digits, 0 padded?? $value = sprintf ("%06d", $value); # Want 4 digits, 0 padded? $value = sprintf ("%04d", $value);
You get the idea.
|
|---|
| Replies are listed 'Best First'. | |
|---|---|
|
RE: Re: Padding out strings.
by btrott (Parson) on Apr 13, 2000 at 19:57 UTC | |
by comatose (Monk) on Apr 13, 2000 at 20:23 UTC |