fgets from middle of a file?

Discussion in 'PHP' started by mahmood, Oct 22, 2007.

  1. #1
    Is there a way we can provide the line number for fgets function to start from somewhere in the middle of a text file rather than the beginning?
     
    mahmood, Oct 22, 2007 IP
  2. nico_swd

    nico_swd Prominent Member

    Messages:
    4,153
    Likes Received:
    344
    Best Answers:
    18
    Trophy Points:
    375
    #2
    www.php.net/fseek

    it doesn't work with line numbers though. But maybe you could do that with file() and array_slice().
     
    nico_swd, Oct 22, 2007 IP
    mahmood likes this.