Location: PHPKode > scripts > GPS Coordinates Distance > gps-coordinates-distance/example.php
<?php

require_once ("gps_class.php");

//$distance = new calcMiles (Latitude coordinate of 1st position, Longitude coordinate of 1st position, Latitude coordinate of 2nd position, Longitude coordinate of 2nd position);
$distance = new calcMiles (89.98321, 21.951274, 89.44865, 22.65947, "miles");

$numericalDistance = $distance->lastResult;
$formattedResult = $distance->lastResultFormatted;

?>
Return current item: GPS Coordinates Distance