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.

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

switch form actions? not working
i want on submit to go to different pages according to the CatID

Code: <?php $CatID=$_

How to copy a part of a vector in a raw memory
Hi,

How can I copy a part of a vector into a memory:

1
2
3
4
5

License Issue - service type user
Hi,

I would like to understand the following issue regarding sap license.
I wish to

Give me all your tricks for minimizing jar file size

Hi, I'm coming close to releasing my J2ME game... I am kicking up against the 64k size barrier w

Gridview Not updating in Update Panel
I have a gridview, three dropdown list boxes, and a button on my form. What is displayed in the gri

Developing Ajax-enabled ASP.Net applications for the iPhone
I would like to develop Ajax web applications using Visual Studio that are optimized for the iPhone.

Help With editting and deleting form
Hallo !!

So look at this image :

http://img194.imageshack.us/img194/8272/snapshot5f.pn

TinyMCE / Ajax Postback Problem
Hiya all,

I have a page which loads the TinyMCE editor. On the postback I obviously want to f

ldap connection
We are using ldap to get user information from the domain controller. It was working before. Recentl

Show specific day of the week
I have been racking my brain trying to get this function to work properly and it is doing so for eve

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