how can I zerofill a number without loosing decimals?
I tried using sprintf but it deleted all my decimals, what I don't want.
I have the number 12.2 and I want it to look like 012.2, but sprintf gives me 012 and removes the decimals. The function I'm using is:
You have a good explanation of the
sprintf format in the PHP manual, which applies to
printf as well.