Re: Individual Lines of text
| From: | Andreas D. Landmark | Date: | Tue, 25 Sep 2001 00:27:24 +0000 |
| Subject: | Re: Individual Lines of text | ||
| References: | 1 | Groups: | php.db |
| Request: | Send a blank email to php-db+get-12680@lists.php.net to get a copy of this message | ||
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. Cheersif 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.