read csv file php

Read CSV file using PHP

How to read csv file using php.This is simple.PHP file methods/ functions can be use to this.fopen(),feof(),fgetcsv(),fclose() are use here.Following function will return after read the csv file.

  • If your csv file is “|” delimiter you need to pass the delimiter as following.
  • PHP fgetcsv() function is return an array.It stops returning on a new line, at the specified length.
  • If not read the all lines of csv file, keep the in the top of the page.
  • The 1000 means that specifies the maximum length of a line.
  • PHP read file line by line.That means row by row.
  • The result is array.Then you can understand that better.

That’s only.

Published by

Sumith Harshan

Sumith Harshan is the Web Engineer Specializes in Java Script, JQuery, HTML4/5, CSS2/3, PHP, CodeIgniter, CakePHP, J2SE, J2EE, XML, Hacking & Security, Mobile Interface Developing, Magento, Wordpress, Joomla, Drupal,PHPBB,Facebook App Developing and Open cart...etc.