title: PHP get random line from CSV without loop
body: <p>I have multiple big CSV files with more than 1 million lines. I can't change that.</p>
  
  <p>I need in a loop, get a random line of a random CSV file and output this line.</p>
  
  <p>For now I have : </p>
  
  <pre><code>        for ($i=0; $i &lt; 50; $i++) {
              $randomFile = $files[array_rand($files)];
  
              if (($handle = fopen($randomFile, "r")) !== FALSE) {
                  //HERE I NEED TO GET A RANDOM LINE OF $handle FILE
              }
          }
  </code></pre>
  
  <p>How can I get a random line of my CSV <code>$handle</code>, without loop like all solution I see everywhere ?</p>
  
  <p>I already tried loop solution but my CSv files are too big and my script freeze each time.</p>
  
  <p>Thanks !</p>