mcerveni Posted March 31, 2009 Share Posted March 31, 2009 How would i format this: 752 (7:52) into 00:07:52 ? Link to comment https://forums.phpfreaks.com/topic/151875-format-time/ Share on other sites More sharing options...
dadamssg Posted March 31, 2009 Share Posted March 31, 2009 look at substr() in the manual...youll prolly have to mess with that and create variables for each number and do something like $a=substr(752,+1); $b=substr(752,-2); $time = "00:0".$a.":".$b"; Link to comment https://forums.phpfreaks.com/topic/151875-format-time/#findComment-797556 Share on other sites More sharing options...
dadamssg Posted March 31, 2009 Share Posted March 31, 2009 oops you shouldn't have that last " it should be $a=substr(752,+1); $b=substr(752,-2); $time = "00:0".$a.":".$b; Link to comment https://forums.phpfreaks.com/topic/151875-format-time/#findComment-797562 Share on other sites More sharing options...
Recommended Posts
Archived
This topic is now archived and is closed to further replies.