adzie Posted November 16, 2008 Share Posted November 16, 2008 Hello again, Im wanting to turn a number into a minute currently the variable $minsdiff shows :2 for two minutes but I'd like it to show :02 or :05 etc any direction appreciated. Link to comment https://forums.phpfreaks.com/topic/132959-time-format/ Share on other sites More sharing options...
wildteen88 Posted November 16, 2008 Share Posted November 16, 2008 PHP nocks of the 0 at the front of integers. to output a 0 at the beginning of single digit number look into sprintf example: $numb = 1; echo sprintf('%02d', $numb); Link to comment https://forums.phpfreaks.com/topic/132959-time-format/#findComment-691423 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.