How would I go about 'zero filling' an integer?
ie
1 becomes 0001
40 becomes 0040
174 becomes 0174
$filled_int = sprintf("%04d", $your_int)
$number = 12;
$width = 4;
$padded = str_pad((string)$number, $width, "0", STR_PAD_LEFT);
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With