PHP str_pad() 函数

str_pad() 函数把字符串填充为新的长度。
str_pad($i,2,’0′,STR_PAD_LEFT);