title: PHP: Read Specific Line From File
body: <p>I'm trying to read a specific line from a text file using php.
  Here's the text file:  </p>
  
  <pre><code>foo  
  foo2
  </code></pre>
  
  <p>How would I get the content of the second line using php?
  This returns the first line:</p>
  
  <pre><code>&lt;?php 
  $myFile = "4-24-11.txt";
  $fh = fopen($myFile, 'r');
  $theData = fgets($fh);
  fclose($fh);
  echo $theData;
  ?&gt;
  </code></pre>
  
  <p>..but I need the second.  </p>
  
  <p>Any help would be greatly appreciated  </p>