Reputation: 117
I have an Auto-Increment field in a database.
I want these numbers to be prepended by zeros, to a maximum length of seven.
Example:
Original number: 1 Desired result: 0000001
or
Original number 768 Desired result 0000768
How would I achieve this in PHP?
Upvotes: 5
Views: 7968