Retrieve data from text file...stuck...
I have a text file (accounting information) which contains a lot of information and some of this information (numbers) I want to retreive and be able to use in calucations etc in a php file. Here is a piece of the text which shows the build up of the information I want to use:
----text file excerpt----
#IB 0 2099 -226930.95
#IB 0 2510 -81219.00
#UB 0 2641 1114.28
#UB 0 2645 6978.00
#UB -1 2890 -43750.55
#RES 0 5800 46239.60
#RES -1 5900 574.92
#RES 0 5900 6402.63
----end----
The identifier is the column containing 2099, 2510, 2641 etc. So for example in a php file a function (extract for example) will open the text file and extract the number to the right based on the identifier column. Php example
(extract(2099) + extraxt(2641)) will result in: -225816,67
Any help much appreciated.