in reply to Reading file into an array and working with it.

You should really consider using a database for this kind of thing if you're going to be doing it more than occasionally. I implemented a "location search" on a website that I developed using this methodology and it works great.
  1. find latitude/longitude of the location the searcher is interested in
  2. determine latitude/longitude of "bounding box" that bounds an area N miles from the latitude/longitude of the search location be sure to take the curvature of the earth into account when doing this computation.
  3. select all location of interest from the DB with a simple SQL query: select * from LOCATION where LATITUDE between LATMIN and LATMAX and LONGITUDE between LONMIN and LONMAX
  • Comment on Re: Reading file into an array and working with it.