One way is to use Readfile(), found in the UDF forum, which would load your file into an array. It would look something like (don't forget to put the READFILE UDF to the bottom of your script)

untested
 Code:
$filearray=readfile("yourfile")
$lastline=$filearray[ubound($filearray)]

? $lastline


Of course you could always use the loop code you have and just use/keep the last value.
_________________________
(... better days ahead)