title: How to I read all existing CSV files on a server?
body: <p>This question is a little complicated, but I will try my best to explain.  Feel free to ask for clarification if my question does not make sense. </p>
  
  <blockquote>
    <p><strong>Situation:</strong></p>
    
    <p>On my server there will be a new CSV file added every day into a particular folder. The CSV files will all be kept in the same folder.  They will have a name consistant with the day.  For example <strong>log_2013_05_24.csv</strong>.  </p>
    
    <p><strong>Objective:</strong></p>
    
    <p>I need to write a PHP program that will find all existing CSV files so that I can search through them. In the end I need to find all the dates that exist.  </p>
  </blockquote>
  
  <p>The data inside the CSV files looks similar to this:</p>
  
  <pre><code>4/14/13, 17:30:56, data, data, data, data
  4/14/13, 17:31:06, data, data, data, data 
  ( ... about 10,000 of these ^ a new line for every 10 seconds all day )
  </code></pre>
  
  <p>I am using php explode to get the dates from my current CSV file.  This will produce an array of strings similar to: '4/14/13'.</p>
  
  <p>But there are two problems:</p>
  
  <p>1: They are strings, not dates</p>
  
  <p>2: I don't know how to find all existing CSV files so that PHP can search them. </p>