There are a couple of ways:

- If the file is small enough, I suppose you could use the
http://ca.php.net/manual/en/function.file.php 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 http://ca.php.net/manual/en/function.fgets.php fgets().

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

Come visit us at http://www.phparch.com!
--- Begin Message ---
here's an example of a text file I need to read...    

abcd|test1|morevalues|otherstuff
efghijklm|a;kd;laskf;alskdjf;alskdf;askldjasldkf|;askd;lakjl;asdf|al;sdjf;alf

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 
text?

Kelly
--- End Message ---
-- 
PHP General Mailing List (http://www.php.net/)
To unsubscribe, visit: http://www.php.net/unsub.php

Reply via email to