0

I want to select a file and display its contents as it is in the browser. Can anyone suggest me how to do this?

hakre
  • 193,403
  • 52
  • 435
  • 836
Anu
  • 11
  • 1
  • 2
  • 3
    `echo file_get_contents('your_file_name.csv');` :P – Vatev Jul 27 '12 at 21:50
  • can i then use that displayed data for further processing like if i have to check if a particular field in the file is present in the database or not? – Anu Jul 27 '12 at 21:54
  • Thank you that works :) and i want to have a Big text box in which i can copy the contents of a CSV file as it is is this possile? – Anu Jul 27 '12 at 21:56
  • `echo '';` – Vatev Jul 27 '12 at 22:02

1 Answers1

0

Here is a library that reads contents of csv file and displays it as table. It is basically a class. if you have object oriented concepts you can do with it. View my answer

Codeigniter REST CSV import to mysql

Community
  • 1
  • 1
Muhammad Raheel
  • 19,823
  • 7
  • 67
  • 103