This must be easy , pulling the last record of the day, every day, from a txt


Posted on 16th Feb 2014 07:03 pm by admin

I have a txt file logging weather data every minutes (so 1 record per minute). I want to extract the data from the (and only that one) last record for every single day in the log file.

Each record as a $date , $time, and other $data fields.

Did you know?Explore Trending and Topic pages for more stories like this.
In all my projects i use all the data to create graphs (jpgraphs), but for that one i only need the data from the last record of the day. What php function do i need to read the file and only select the last $time of the $date and pickup every last $time on all $date from the file. Of course when that record is ''the one'' for that day , i need to pull the other $data fields (they'll be use to create the graph).

I tried several things, but i'm not able (don't know how) to segregate records looking at different fields in the array and of course pick the right one.

I'm sure it's an easy one, but i just don't get the logic to get it done
No comments posted yet

Your Answer:

Login to answer
202 Like 20 Dislike
Previous forums Next forums
Other forums

Include with Parameters
In a particular page I would like to include a file that requires $_GET parameters.

when I go

Coefficient of a Restitution Hints
Hello. I was wondering if anyone can give me hints on how to write this program...

The coeffi

Help With editting and deleting form
So look at this image :

http://img194.imageshack.us/img194/8272/snapshot5f.png
This table

Changing files over
Just thought I'd start with the new forums looking really nice .

Ok basically I've made this

Members Only
Hi all, for my website i have a members area only which on members can veiw, but at the moment anyon

opening a window with after form submission
I know this this forum has nothing to do with JS, but i'm trying to use it with my php script.
<

Required to login help
I'm trying to set up my site so users have to be logged into the forum to access the site.I've been

Delete Client 066 Earlywatch
Hi all,

in former times client earlywatch was required for SAPs remote access to SAP inst

problem with array - multilingual page
this is my test page :
Code: <?php
if(isset($_GET['lang'])) {
if($_GET['la

A href problem under php
Hello...

I tried to explain the issue in an earlier post.. but was not clear enough....

Sign up to write
Sign up now if you have flare of writing..
Login   |   Register
Follow Us
Indyaspeak @ Facebook Indyaspeak @ Twitter Indyaspeak @ Pinterest RSS



Play Free Quiz and Win Cash