How to read csv file using php?

How to read a csv file and put it into a database for each day in php?

  • Answer:

    Really bad question. Do you mean everyday read a file from csv and insert contents into database? Or, read a csv file containing info for each day of the week, inserting the contents into the database? here is a simple php script that will show you the contents of your csv file, line by line, you'll have to take it from there. $file="csv_file.csv"; $fp=fopen($file,"r"); while($data=fgetcsv($fp,4096,",","'"))… print_r($data); } fclose($fp);

Hunterq Dahl at Yahoo! Answers Visit the source

Was this solution helpful to you?

Related Q & A:

Just Added Q & A:

Find solution

For every problem there is a solution! Proved by Solucija.

  • Got an issue and looking for advice?

  • Ask Solucija to search every corner of the Web for help.

  • Get workable solutions and helpful tips in a moment.

Just ask Solucija about an issue you face and immediately get a list of ready solutions, answers and tips from other Internet users. We always provide the most suitable and complete answer to your question at the top, along with a few good alternatives below.