> 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.

You can read the entire text file to a string and then use explode() to
break it into an array using the newline character. Like this:

$array = explode("\n", $string);

That should make it easy to store it line by line to a dbase.

Justin -- http://blaix.org


-- 
PHP Windows Mailing List (http://www.php.net/)
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]
To contact the list administrators, e-mail: [EMAIL PROTECTED]

Reply via email to