5
I have a field with a limit of 4 characters where a value will enter, I would like the remaining space to complete with zeros from left to right, for example, if the user inserts the number 4. I would have to leave 0004, if I inserted 100, I would have to leave 0100, if I inserted 1000, would come out 1000 and so on.
How can I do this with PHP?
Do you want these zeroes to appear when the user enters a value? If so, you will need to do it with Javascript.
– Woss
It is not necessary, it is enough that the output goes out that way
– Geraldão de Rívia