Hi guys.
I have a series of 4,5 and 6 digit numbers that I'm pulling from MySQL however when I print them I need them all to be 6 digits long and any that are less are pre-pended with zeros. Eg.
12345 becomes 012345
5675 becomes 005675
I have looked at number_format but it doesn't seem to do this (more decimals). I have written a clumsy bit of code using if's but wondered if there was a function or regex way of doing this simply.
Cheers.