RE: [PHP-DB] Individual Lines of text
| From: | Beau Lebens | Date: | Tue, 25 Sep 2001 01:58:56 +0000 |
| Subject: | RE: [PHP-DB] Individual Lines of text | ||
| Groups: | php.db | ||
| Request: | Send a blank email to php-db+get-12681@lists.php.net to get a copy of this message | ||
or you can fopen() the text file, then fgetcsv() each line, using "," as a
separator, which is just a neat, clean way of doing explodes :)
enjoy
beau
// -----Original Message-----
// From: Andreas D. Landmark [mailto:andreas.landmark@noxtension.com]
// Sent: Tuesday, 25 September 2001 8:27 AM
// To: php-db@lists.php.net
// Subject: Re: [PHP-DB] Individual Lines of text
//
//
// At 25.09.2001 01:19, 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
//
// if the lines are exactly as you describe them (ie.
// comma-separated) read
// the file
// line by line and use the explode() function to create an
// array of each line
// and flush
// it to the db of your choice...
//
//
//
// --
// Andreas D Landmark / noXtension
// Real Time, adj.:
// Here and now, as opposed to fake time, which only
// occurs there
// and then.
//
//
// --
// PHP Database Mailing List (http://www.php.net/)
// To unsubscribe, e-mail: php-db-unsubscribe@lists.php.net
// For additional commands, e-mail: php-db-help@lists.php.net
// To contact the list administrators, e-mail:
// php-list-admin@lists.php.net
//