On Wednesday 20 November 2002 03:45, Kelly Meeks wrote:
> 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;a
>lf
>
> 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?

file() will read the whole file into an array, then use foreach() to loop 
through each line.

-- 
Jason Wong -> Gremlins Associates -> www.gremlins.biz
Open Source Software Systems Integrators
* Web Design & Hosting * Internet & Intranet Applications Development *

/*
Don't vote -- it only encourages them!
*/


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

Reply via email to