\n"; echo "\nNewsletter Log\n"; echo "IDIPDate\n"; //declare variable to count records $rowcount = 0; //get path to file $path_to_file="marketinglog.txt"; //open file for reading "r" $handle = fopen($path_to_file, "r"); //read file line by line while (($record = fgetcsv($handle, 1000, ",")) !== FALSE) { //read field values in variable $ID=$record[0]; $IP=$record[1]; $date=$record[2]; echo "\n".$ID."".$IP."".$date."\n\n"; $rowcount++; } fclose($handle); echo "\n"; echo "

Row Count: " . $rowcount . "

"; ?>