slawrence10 Posted March 15, 2010 Share Posted March 15, 2010 Hey, is there a simple function that I can perform to convert an integer into a 6 digit number? ie. 1 becomes 000001 139 becomes 000139 Thanks for your time! Kind Regards, Scott Quote Link to comment https://forums.phpfreaks.com/topic/195284-function-to-turn-integer-to-6-digits/ Share on other sites More sharing options...
PFMaBiSmAd Posted March 15, 2010 Share Posted March 15, 2010 http://us2.php.net/manual/en/function.str-pad.php Quote Link to comment https://forums.phpfreaks.com/topic/195284-function-to-turn-integer-to-6-digits/#findComment-1026239 Share on other sites More sharing options...
slawrence10 Posted March 15, 2010 Author Share Posted March 15, 2010 That's brilliant! Thank you! Quote Link to comment https://forums.phpfreaks.com/topic/195284-function-to-turn-integer-to-6-digits/#findComment-1026243 Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.