1. Home
  2. Computing & Technology
  3. PHP / MySQL
photo of Angela Bradley
Angela's PHP / MySQL Blog

By Angela Bradley, About.com Guide to PHP / MySQL

End of a File

Wednesday June 14, 2006
When you are reading data from a file, you are often using a loop, reading one line of the file at a time. But how do you know when to stop and exit the loop? That is where feof () is used. Feof () checks to see if you are at the end of the file and returns a true or false. If the condition on your loop is !feof($yourfile) it will cycle until the entire file contents have been read and then stop.
Comments

No comments yet. Leave a Comment

Leave a Comment

Line and paragraph breaks are automatic. Some HTML allowed: <a href="" title="">, <b>, <i>, <strike>

Discuss
Community Forum
Explore PHP / MySQL
About.com Special Features

Stay connected and entertained with reviews on tips on the latest HDTVs, cellphones and more. More >

Easy ways to connect two computers for networking purposes. More >

  1. Home
  2. Computing & Technology
  3. PHP / MySQL

©2009 About.com, a part of The New York Times Company.

All rights reserved.