joecooper Posted July 22, 2009 Share Posted July 22, 2009 Hi, I have the varible ($imageid), and this will be a number, (1, 2, 3, 10....) but i need to format this number so it will have 5 digits (00001, 00002, 00003, 00010) how can i format this? Thanks! Joe Link to comment https://forums.phpfreaks.com/topic/166987-number-formatting/ Share on other sites More sharing options...
Mark Baker Posted July 22, 2009 Share Posted July 22, 2009 $padded = str_pad($number,5,'0',STR_PAD_LEFT); Link to comment https://forums.phpfreaks.com/topic/166987-number-formatting/#findComment-880392 Share on other sites More sharing options...
joecooper Posted July 22, 2009 Author Share Posted July 22, 2009 nice thanks, ill try that out Link to comment https://forums.phpfreaks.com/topic/166987-number-formatting/#findComment-880410 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.