while (!feof($myfile)){
This while loop loops through the $myfile variable one line at a time until it gets to the end-of-file.
!feof means "not the end of the file."
So, this line means: "Keep looping through each line in the $myfile file while it has 'not' (!) reached 'the end of the file' (feof)."
When the program reaches the end of the file, it will exit the loop.