How to keep leading zeros in PHP integer [duplicate]

You cannot keep leading zeros in integer. You can either keep them in a string or add at output time, using sprintf(), str_pad(), etc.

Leave a Comment