title: PHP way to get count of lines in file and to move file pointer to specified line?
body: <p>Is there a way to:</p>
  
  <ol>
  <li>count number of lines (1 line = data row) in my small_db.php</li>
  <li>tell PHP to move file pointer exactly to start of line 322. (so I could fgets() data from this line)</li>
  <li>tell PHP to return line number or entire content of line in which text "Quick brown fox" occures?</li>
  </ol>
  
  <p>I know there is another way by getting all contents of file in one single string, but as you know that method is time and memory inefficient if the size of file is big.</p>