Re: [PHP] Simple reading a file and extract fields

2007-11-13 Thread Jochem Maas
Ronald Wiplinger wrote: > I got a larger file which consists of lines with a defined length of 56 how large? for very big files it's dangerous to read them in all at once, as was exampled in other replies. I would say that large in this case would be anything bigger than 5 Mb (this is a very rough

Re: [PHP] Simple reading a file and extract fields

2007-11-13 Thread David Calkins
The fgets() function only reads a single line from the file. See the below link for a way to read through all lines in the file. Then after reading each line, use substr to pull out the fields. http://us.php.net/manual/en/function.fgets.php On Nov 13, 2007 8:53 AM, Ronald Wiplinger <[EMAIL PRO