I've got a number that MUST be 3 numbers long. It starts at 001 and works it's way up to 999. I'm just not sure how to format this with php. If I do this:
$a = 013;
echo $a;
It outputs: 11
Once it gets to 100, it will work fine, but I need a way to keep the zero in front of the number until it gets there.
Also, I will be pulling this information from a database, and the number is stored as a string. So, how would I convert '013' to the integer 013? I've got to pull it from the database, convert it to an integer, add one, convert it back to a string, and then update the database with the new number. How do I do all that converting?
Any help would be appreciated! Thanks,