$f = fopen ("test.txt", "r");while ($line=fgets($f)) { if($line!=FALSE){ $arr[] = explode(',',trim($line)); }}fclose ($f);var_dump($arr);