I want to print a list of numbers in php.
But I want to print 4 digits of numbers (preceding with zero if necessary), e.g.
0001, 0009, 0076, 0129, 1234
What should I do?
I want to print a list of numbers in php.
But I want to print 4 digits of numbers (preceding with zero if necessary), e.g.
0001, 0009, 0076, 0129, 1234
What should I do?
Look at the PHP Language Reference Manual and search for zero-padded integers
The link gives the sprintf details, but the format string information applies to related functions like printf