php - How can I print number in 4 digit? -
i want print list of numbers in php.
want print 4 digits of numbers (preceding 0 if necessary), e.g.
0001, 0009, 0076, 0129, 1234
what should do?
printf("%04d", $num);
i want print list of numbers in php.
want print 4 digits of numbers (preceding 0 if necessary), e.g.
0001, 0009, 0076, 0129, 1234
what should do?
printf("%04d", $num);
Comments
Post a Comment