Reading and seperating data in a text file
Posted: Tue Feb 20, 2007 11:23 am
I was wondering what the best way around this problem would be, if at all possible.
Say I have a mysql database with the fields in a table being:
Name
Number
Address
If my .txt file was layout like this:
Is there a way of putting all this information in to an array and picking out each piece that is seperated with a comma so that I can generate an insert mysql query?
Say I have a mysql database with the fields in a table being:
Name
Number
Address
If my .txt file was layout like this:
Code: Select all
Keveh, 456789, 13 House
Paul, 34567, 45 Flat
John, 12345, 10 Apartment