title: Read multiple csv files in folder
body: <p>i need a help ^^ 
  What i need is script which will open and read all .csv files in folder 'csv/files' and then do that thing in "if". Well, when i had only one file it worked fine. I managed to construct some script which is not working but no "error line" popping up either ...
  So can somebody look at my code and tell me what i am doing wrong ?     </p>
  
  <pre><code>&lt;?php 
  foreach (glob("*.csv") as $filename) {
      echo $filename."&lt;br /&gt;";
  
      if (($handle = fopen($filename, "r")) !== FALSE) {
          while (($data = fgetcsv($handle, 1000, ";")) !== FALSE) {
              $url = $data[0];
              $path = $data[1];
  
              $ch = curl_init($url);
              $fp = fopen($path, 'wb');
              curl_setopt($ch, CURLOPT_FILE, $fp);
              curl_setopt($ch, CURLOPT_HEADER, 0);
              curl_exec($ch);
              curl_close($ch);
              fclose($fp);
  
          }
          fclose($handle);
      }
  }
  ?&gt;
  </code></pre>