OK Basically I have a dir of csv files that are built each time a user submits a form. One of the form fields is named initials. What I would like to do is count how many times each user submitted the form on a daily , weekly, and monthly basis.
Basicly I want it to output like so:
WFN has submitted 16 time this month:
What would be the best way to do this?
Would I search through the entire dir and loop through each csv file?
Any hints or code sample or just a point in the right direction would help out a newbie.
TIA,
Wes/
count how many times...
Moderator: General Moderators
Check out php.net/filesystem . Make sure to look at readdir() , opendir() , and a method that best suits you for opening files ( fpassthru(), fopen(), file() ).
Once you are able to access the directory and read the required files into an array, you should then consider using something like explode() (based on , ) to break up the information into logical pieces so you can manipulate it.
Hope that helps a little.
Once you are able to access the directory and read the required files into an array, you should then consider using something like explode() (based on , ) to break up the information into logical pieces so you can manipulate it.
Hope that helps a little.