hi all,
i am currently working with a csv file to import data into mysql using php.
i am able to read all data using the piece of code.
but i want to read only first row of file.can anyone help to get it?
thanks in advance
i am currently working with a csv file to import data into mysql using php.
i am able to read all data using the piece of code.
Code:
$fd = fopen ("upload/consumption.csv", "r");
while (!feof ($fd))
{ $buffer = fgetcsv($fd, 5000);
}
fclose ($fd);
thanks in advance
Comment