First you need to open the file, using the fopen() function, which will return a pointer.
Then you'll need a while loop, asking while the end of file hasn't been reached, use the fgets() function to grab a line from the file.
Have a look at http://uk.php.net/manual/en/function.fgets.php for the structure of the function, and links to the other file functions you may need.