Forum : What is feof() function in PHP?
Brief description  about Online courses   join in Online courses
View Arun  Desai 's Profile

What is feof() function in PHP?

What is feof() function in PHP?????
Asked by Arun Desai | Mar 17, 2010 |  Reply now
Replies (1)
View teacher siliconindia 's Profile
Hi Arun,
The feof() function checks if the "end-of-file" (EOF) has been reached.

The feof() function is useful for looping through data of unknown length.
Note: You cannot read from files opened in w, a, and x mode!
if (feof($file)) echo "End of file";

Mar 17, 2010