[ create a new paste ] login | about

Link: http://codepad.org/Wik6cg01    [ raw code | output | fork ]

PHP, pasted on Oct 19:
1
2
3
4
5
6
<?php

$row['diff'] = "87:14:38";

sscanf($row['diff'], '%i:%i:%i', $hour, $min, $sec);
echo "$hour hours, $min minutes, $sec seconds";


Output:
1
87 hours, 14 minutes, 38 seconds


Create a new paste based on this one


Comments: