View Full Version : Reading data from Text Files and store in variables?

06-08-2005, 06:44 PM

I have some data in text format(or in a excel file). Like in first cell, "name is stored", in second cell "Father name is stored", in third cell "age is stored".

I want to read this data through php code, and want to store each record in a variable

Kindly tell me that how can write this code.

Waiting for a reply soon.


06-08-2005, 06:50 PM
fopen() (http://www.php.net/manual/en/function.fopen.php)

file_get_contents() (http://www.php.net/manual/en/function.file-get-contents.php)
file() (http://www.php.net/manual/en/function.file.php)

07-24-2005, 07:17 PM
file() puts the entire content of the file in an array, is there a function that does the same thing, but only reads the first or last say 10 lines of a file.

EZ Archive Ads Plugin for vBulletin Copyright 2006 Computer Help Forum