1. Introduction and Sample
If you have a travel related web site or any kind of site where your visitors are interested in distances then this distance calculator may be just the addition you are looking for to put on your site.
The following example displays the distances between a small number of cities in Europe but the script can be easily adapted to work with any locations simply by entering the names of the locations and the distance (in kilometres) between them into a multi-dimensional array. The script simply requires starting and destination cities to be selected and the distance between them will be extracted from the array and displayed.