...

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



eshban
06-08-2005, 06:44 PM
Hi,

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.

Eshban

CrAzY_J
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)
or
file() (http://www.php.net/manual/en/function.file.php)

vern
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