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

202 Like 20 Dislike
Previous php-forum Next php-forum
Other php-forum

1,000 select boxes with 100 options?!
I have 1 drop down select box with 1,000 options.


In some case, there will be 100+ of the

Curl timeout breaks script
So im having difficulties with skipping timeout error in curl
my script calls different functions

need help with this contact form
I made this form and I need it to read the data and write the data to a table and its not working ca

Working with popups and such in a class
I've recently started building my applications completely enclosed in classes. I like the fact that

login and redirect
hello! can someone help me.. can you give me an idea.. I want to make a login page and redirects it

for loop without same $i digits?
Hi,

Can some guru please advise how can I accomplish this with a simple for loop ?

I

iterating through an array and escape each value independently.
I have a set up where the variable being escaped is an array and it needs to be iterated and escaped

Multiple if statements
Ok so seems basic but for some reason I'm not doing it right. What I want is to be able to have 2 se

Compare user input to flat file data
Help...Am a complete newbie to programming so my code is prolly quite long. Am trying to verify a us

Can I call a class inside a function?
I have a class written in another file that handles my image resizing.

Can I do this (php say

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