You can, using the code from above just do something like this
etc.
There is probably a while loop or a foreach loop you can do this with as well but I dont know it off the top of my head.
The $file variable is made into an array in the code previously posted so it can store the entire text file with the lines seperated by adding the [#] to end of variable to select which line number u want (starting at 0 for line 1).