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.
In reply to Re: Padding out strings.
by comatose
in thread Padding out strings.
by Speedfreak
| For: | Use: | ||
| & | & | ||
| < | < | ||
| > | > | ||
| [ | [ | ||
| ] | ] |