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

path to include folder
Hi everyone,

When I'm testing locally, I have to add the name of the site folder as part of t

filesize problem
i use ubuntu 9.10 and i have mountet a folder from an windows

/mount/FOLDER
/mount/FOLDER/

file_put_contents and createimagefromjpeg
All,
I do somethings and then I have the following code:
file_put_contents('./test/'.$filename

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

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

Two warning messages
Quote<b>Warning</b>: mysql_real_escape_string() expects parameter 1 to

help me fix these syntax errors...
I keep getting multiple syntax errors on this script like this one:

Parse error: syntax error

generating all possible random letters
hi'

how can i randomize the letters a,b,c,d,e all possible ways, and i want to print the res

Cron Job and Output
I have php codes running under a cron job.
But everytime i output (echo) , it comes out as comple

Need help making a blockquote and line items conditional
I have some code I bought a few years ago that allows my clients to update content on their site usi

include function being weird?
I have a very simple system to grab an IP outputted by a PHP file.. (for a project I have) but it ou

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