Re: Individual Lines of TEXT

From: Date: Tue, 25 Sep 2001 00:54:28 +0000
Subject: Re: Individual Lines of TEXT
References: 1  Groups: php.general 
Request: Send a blank email to php-general+get-68627@lists.php.net to get a copy of this message
On Tue, 25 Sep 2001 09:49, Devon wrote: > I am pulling down data from a switch which looks like > > Port 1, 33889029532 > Port 2, 0 > Port 3, 135852 > Port 4, 6652941243 > etc etc > > I need to know if it is possible with PHP to write a script that will > pull the individual lines of this text file and store them into a mysql > database line by line. > > Cheers Yes - have a look at the filesystem functions to get the lines of the file; you could use fopen()/fgets() to return a line at a time or even just file() to return all lines as elements of an array. -- David Robley Techno-JoaT, Web Maintainer, Mail List Admin, etc CENTRE FOR INJURY STUDIES Flinders University, SOUTH AUSTRALIA Killer Rabbit's Motto: "Lettuce Prey."

« previous php.general (#68627) next »