Extraction of data from textfile into mysql/php

Hi,

I’m a noobie in PHP/mySQL, and I’m still in a learning process. I have a textfile located on the desktop, and I want to extract the data from it and put these data into my database.
My data in the code is in this format in the text file:

2011/10/16 18:00
Total sum: 60

My objective is to put these data into my database table in “Date Time Sum”

Anyone got any idea of a sample source code for this, thank you!!!

Regards,
Eugene

hmm…it’s a .txt file instead of a csv file unfortunately

If the data you want to extract is always in the same format, then take a look at http://www.php.net/manual/en/function.substr.php