Ok so now I am stuck, I looked at the http://www.daniweb.com/web-development/php/threads/326436/php-read-text-file-and-save-into-databse page and understand some of it, Yet it is not what i require, substring does not count like I thought it would, like the left, right mid commands in excel.
I want to count to the data I want and post it to MySql
Data looks like this' the fie is always in the same format
Let say the date is the 30th char from the left, I want to use something like:
$date = String or Substring( Distance to char, Amount of chars
Loop after line 21 untill left = "=" or ""
end loop
So it will look like extract just that section of data.
file attached
I have done this VB and it works, but now I finding it hard to get Just the date from line 1
Assign it to variable, Then go to Line 21
Assign the AccountNumber, Customer number, Sales Repname, Amount
Post to Mysql, The document Date, AccountNumber, Customer number, Sales Rep, Amount
then next ine 22, (We have the date so dont need to get it again)
Assign the AccountNumber, Customer number, Sales Repname, Amount .. and do this untill the begining of the line is either empty or has this "=" char
im stuck just on that