Philip, I'm on Windoze. So are you suggesting that I should read the line in, explode into an array, pop those fields that I don't want/need and then implode the array back into a string before fwrite?
George > -----Original Message----- > From: Philip Hallstrom [mailto:[EMAIL PROTECTED] > Sent: 27 March 2003 3:38 pm > To: George Pitcher > Subject: Re: Removing columns from a text file > > > If you have a unix/linux/bsd box around "man cut" would probably do it. > Otherwise you could read it in with php and use explode(). > > -philip > > On Thu, 27 Mar 2003, George Pitcher wrote: > > > I have a text file file ready to go into a Filemaker database. > It has over > > 5000 rows, each containing over 500 columns. > > > > If I do a straight import I can only pull in the first 442 > colums, but all > > records. I can't take it in via Excel for the same reason - column limit > > stops at 'IV' - never got that far before. > > > > Is there a way to remove columns from the file using php on a > fgets() basis? > > I can identify which columns I can do without quite easily - certainly > > enough to pare the file down to a reasonable extent. > > > > An alternative would be to create a MySQL Table and drop columns there. > > > > Advice on best route would be welcome. > > > > Cheers > > > > George > > > > > > === > > > > 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 [EMAIL PROTECTED] > > > > www.ingenta.com > > Ingenta: Empowering the exchange of academic and professional content > > online. > > > > > > -- > > PHP General Mailing List (http://www.php.net/) > > To unsubscribe, visit: http://www.php.net/unsub.php > > > -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php