There are a couple of ways:

- If the file is small enough, I suppose you could use the file function, which loads
the file in array (one element per line).

- If the file is bigger, you can use the normal fopen() functionality
and then use fgets().

Hope this helps!
php|architect - The magazine for PHP Professionals
The first monthly worldwide magazine dedicated to PHP programmers

Come visit us at!
--- Begin Message ---
here's an example of a text file I need to read...    


I believe each line is seperated by a carriage return.

How can I read this in one line at a time in to a variable?

I'm assuming that I could then explode that variable using the pipe as the seperator 

--- End Message ---
PHP General Mailing List (
To unsubscribe, visit:

Reply via email to