Text file contains the folowing lines:
somedata somedata somedata somenumber
somedata somedata somedata somenumber
somedata somedata somedata somenumber
somedata somedata somedata somenumber
Like a log.
What I want to be able to do is read a line from the file and just get the "somenumber" bit on the end and assign it to a variable to use in the php script.
- Code: Select all
$variable = "somenumber"
For instance so that you can add up all the "somenumbers" at the end of the lines and have a total of all the some numbers for the whole text file.
Any suggestions or code would be greatly apreciated.
phantom_turtle

