How can I get the total number of rows that are in a CSV file using PHP? I\'m using this method but can get it to work properly.
if (($fp = fopen(\"test.csv\
$filename=$_FILES['sel_file']['tmp_name']; $file=fopen($filename,"r"); $RowCount=0; while ((fgetcsv($file)) !== FALSE) { $RowCount++; } echo $RowCount; fclose($file);