mysql - How to parse CSV files in PHP -


i want stock fields in mysql coming excel i'm not arrived cut lines excel in php

example:

123,15,0,01/01/2000,456462abcd,,, 

any please ?

just use function parsing csv file

http://php.net/manual/en/function.fgetcsv.php

$row = 1; if (($handle = fopen("test.csv", "r")) !== false) {   while (($data = fgetcsv($handle, 1000, ",")) !== false) {    $num = count($data);   echo "<p> $num fields in line $row: <br /></p>\n";   $row++;   ($c=0; $c < $num; $c++) {     echo $data[$c] . "<br />\n";   }  }   fclose($handle); } 

Comments

Popular posts from this blog

php - failed to open stream: HTTP request failed! HTTP/1.0 400 Bad Request -

java - How to filter a backspace keyboard input -

java - Show Soft Keyboard when EditText Appears -