$csvFile = file('../somefile.csv'); $data = []; foreach ($csvFile as $line) { $data[] = str_getcsv($line); }