Re: reading lines from a file

From: Date: Tue, 11 Feb 2003 13:53:50 +0000
Subject: Re: reading lines from a file
References: 1  Groups: php.windows 
Request: Send a blank email to php-windows+get-18460@lists.php.net to get a copy of this message
Is this the same problem we discussed a week ago?? Jochem George Pitcher wrote:
Hi, I have a huge file that I want to get into a db format. There are over 5000 records and I need to create fieldnames on the fly. Each record comprises a number of lines (fields) containing 2 elements (fieldname [first 5 chars (which need rtrimming)], value [rest of line, some with lots of text]). Some fieldnames are duplicated within a record so I need to rename these by using a counter which is reset for each record (there are at least 5 fieldnames that are affected this way - so 5 counters). Some values contain subfields so I need to be able to handle these, but this doesn't look frightening. And I would like to end up with an array with keys (fieldnames) and values. But I'm stuck at the first hurdle because I can't find out how to put a line into a string. Any pointers? George in Oxford === George Pitcher HERON Technical Manager Ingenta plc 23-38 Hythe Bridge Street, Oxford, OX1 2ET T +44 (0)1865 799137 direct T +44 (0)1865 799000 switchboard F +44 (0)1865 799134 E george.pitcher@ingenta.com www.ingenta.com Ingenta: Empowering the exchange of academic and professional content online.


« previous php.windows (#18460) next »