Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- function secondsToReadable($time = 0){
- $weeks = floor($time/604800);
- $time = $time - ($weeks * 604800);
- $days = floor($time/86400);
- $time = $time - ($days * 86400);
- $hours = floor($time/3600);
- $time = $time - ($hours * 3600);
- $mins = floor($time/60);
- $time = $time - ($mins * 60);
- $secs = $time;
- return "{$weeks}wk {$days}day {$hours}hr {$mins}min {$secs}sec";
- }
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement