(PHP 5 >= 5.1.0)
The SplFileObject class offers an object oriented interface for a file.
$filename
   [, string $open_mode = "r"
   [, bool $use_include_path = false
   [, resource $context
  ]]] )$delimiter = ","
   [, string $enclosure = "\""
   [, string $escape = "\\"
  ]]] )$delimiter = ","
   [, string $enclosure = "\""
   [, string $escape = "\\"
  ]]] )$open_mode = r
   [, bool $use_include_path = false
   [, resource $context = NULL
  ]]] )SplFileObject::DROP_NEW_LINEDrop newlines at the end of a line.
SplFileObject::READ_AHEADRead on rewind/next.
SplFileObject::SKIP_EMPTYSkips empty lines in the file.
SplFileObject::READ_CSVRead lines as CSV rows.