Read a text file and transfer contents to mysql database

Posted by Jack Brown on Stack Overflow See other posts from Stack Overflow or by Jack Brown
Published on 2010-04-08T15:49:11Z Indexed on 2010/04/08 15:53 UTC
Read the original article Hit count: 690

Filed under:
|
|
|
|

I need a php script to read a .txt file.

The content of the text file are like this:

data.txt
145|Joe Blogs|17/03/1954
986|Jim Smith|12/01/1976
234|Paul Jones|19/07/1923
098|James Smith|12/09/1998
234|Carl Jones|01/01/1925

These would then get stored into a database like this

DataID |Name |DOB
234 |Carl Jones|01/01/1925

I would be so grateful if someone could give me script to achieve this.

© Stack Overflow or respective owner

Related posts about php

Related posts about file