I am trying to access a website that has tab delimited data and use PHP to
open the file, read from the
file for output.

I'd like to then place this data into an array, loop through the array and
output only the next to last record.

It is:
http://waterdata.usgs.gov/ny/nwis/uv?format=rdb&period=1&site_no=01420500

Is there any way to loop through the following records - there are 96 -
and keep only the *next to last last one* (which would be the most
current record) before hitting EOF.

They store the records every 15 minutes for a 24 hour span.

I do not need all 96 records - only the most current -  or - next to last -
record.

......................
Example:

USGS 01420500 2002-10-08 06:00 1.56 135 11.6
USGS 01420500 2002-10-08 06:15 1.55 133 11.5
USGS 01420500 2002-10-08 06:30 1.55 133 11.4
USGS 01420500 2002-10-08 06:45 1.55 133 11.3
USGS 01420500 2002-10-08 07:00 1.55 133 11.3
USGS 01420500 2002-10-08 07:15 1.55 133 11.3 // This would be the most
current one.
USGS 01420500 2002-10-08 07:18
...............

In which, I would like to extract the next to last record.

Any help would be greatly appreciated.
Thank you.
Tony Ritter





-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to