Login   Register  
PHP Classes
elePHPant
Icontem

File: sample1.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Usman Didi Khamdani  >  Count Hour Class  >  sample1.php  >  Download  
File: sample1.php
Role: Sample output
Content type: text/plain
Description: Count Hour Class Output Example
Class: Count Hour Class
Calculate the length of time between two moments
Author: By
Last change: define output with define hour function
Date: 5 years ago
Size: 354 bytes
 

Contents

Class file image Download
<?php

include('CountHour.class.php');
$time = new CountHour();

$first = '12:57:23';
$last = '21:09:04';
$time_difference = $time->diff($first,$last);
$time_difference2 = $time->define_hour($time_difference);

echo '1st time = '.$first.'<br />
2nd time = '.$last.'<br />
Time difference = '.$time_difference.' ('.$time_difference2.')';

?>