pad leading zero php code example
Example 1: php format int to 9 digits with preceding zeroes
str_pad($input, 9, "0", STR_PAD_LEFT);
Example 2: php pad leading zeros
str_pad($value, 8, '0', STR_PAD_LEFT);
str_pad($input, 9, "0", STR_PAD_LEFT);
str_pad($value, 8, '0', STR_PAD_LEFT);