php format int to 9 digits with preceding zeroes
snippet in php

php format int to 9 digits with preceding zeroes

user2536

str_pad($input, 9, "0", STR_PAD_LEFT);