title: PHP: Read specific lines in a large file (without reading it line-by-line)
body: <p>I have this file structure:</p>
  
  <pre><code>line1 (number or a a short string)
  line2 (can be several MB of text)
  ;
  line1
  line2
  ;
  line1
  line2
  ;
  ...
  </code></pre>
  
  <p>The total filesize is exceeding 100MB so reading it line by line each time is rather slow.
  I want to read only "line1" of each block and skip all the "line2". Or just read a line which I know the linenumber for. Is there any way that I can do it with php? The standard methods of reading lines takes the lines into memory and it not so effective with this structure.</p>
  
  <p>(I know a database structure would be a much better use but this is a study-case that I really want an solution to.) </p>