I have one CSV file. It contains 3 columns I want to count only the 3rd column total rows. I tried with one code but It showed the whole CSV file rows counts.
$record = file('filename.csv', FILE_IGNORE_NEW_LINES | FILE_SKIP_EMPTY_LINES);
$total_record = count($record);
echo $total_record; // output 6
As per the below image, I want to count only the Ph_no column. Please help me out

file()