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); 

Comments

Popular posts from this blog

c++ - Convert big endian to little endian when reading from a binary file -

C#: Application without a window or taskbar item (background app) that can still use Console.WriteLine() -

unicode - Are email addresses allowed to contain non-alphanumeric characters? -