Login   Register  
PHP Classes
elePHPant
Icontem

File: DistanceTime.example.php

Recommend this page to a friend!
Stumble It! Stumble It! Bookmark in del.icio.us Bookmark in del.icio.us
  Classes of Tim Charnecki  >  Distance Time  >  DistanceTime.example.php  >  Download  
File: DistanceTime.example.php
Role: Example script
Content type: text/plain
Description: A simple example of the DistanceTime class
Class: Distance Time
Calculate the speed, pace for distances ran
Author: By
Last change:
Date: 2007-11-08 16:26
Size: 272 bytes
 

Contents

Class file image Download
require_once(DistanceTime.class.php);

// This example calculates splits for a 3 hour marathon.
$rp = new DistanceTime(26.2, 'mi', 0, 0, 3);
echo $rp->getPaceString('min/mi', true) . "\n";
echo $rp->getSpeedString('mi/h', true) . "\n";
var_dump($rp->getAllSplits());