I am reading a large CSV file through fgetcsv()
. I want to read the header of the file and the data separately. Below is my code. Any help?
$msg_row = 1;
while (($result = fgetcsv($msg_file,1000, ",")) !== false)
{
$msg_data[] = $result;
$msg_row++;
}