Function for converting 3 to 00003?
Posted: Tue Sep 12, 2006 12:17 pm
Hi!
Is there a function for PHP to convert 3 to 00003, for example if I:
The result would be 00003! I need to save data to spreadsheet, but it needs to have thous 00 in the left. I could just add "00" to these vaiables, but the problem is it can be also 5234, so it would have to be 05234. Any suggestions? Thank you!
Is there a function for PHP to convert 3 to 00003, for example if I:
Code: Select all
echo some_function(3);The result would be 00003! I need to save data to spreadsheet, but it needs to have thous 00 in the left. I could just add "00" to these vaiables, but the problem is it can be also 5234, so it would have to be 05234. Any suggestions? Thank you!