title: Read CSV file in php
body: <p>PHP file</p>
  
  <pre><code>$teste =  fopen("teste.csv", "r");
  
  print "&lt;table border=\"2\"&gt;";
  
  while (!feof($teste) ) {
  
  $line_of_text = fgetcsv($teste);
  
  print "&lt;tr&gt;
      &lt;td&gt;$line_of_text[0]&lt;/td&gt;
      &lt;td&gt;$line_of_text[2]&lt;/td&gt;
      &lt;td&gt;$line_of_text[3]&lt;/td&gt;
      &lt;td&gt;$line_of_text[4]&lt;/td&gt;
      &lt;td&gt;$line_of_text[5]&lt;/td&gt;
      &lt;td&gt;$line_of_text[6]&lt;/td&gt;
      &lt;td&gt;$line_of_text[7]&lt;/td&gt;
      &lt;td&gt;$line_of_text[8]&lt;/td&gt;
      &lt;td&gt;$line_of_text[9]&lt;/td&gt;
       &lt;td&gt;$line_of_text[10]&lt;/td&gt;
      &lt;td&gt;$line_of_text[11]&lt;/td&gt;
    &lt;/tr&gt;";
  
  }
  
  print "&lt;/table&gt;";
  
  fclose($teste);
  </code></pre>
  
  <p>CSV file</p>
  
  <pre><code> ,912,Gold,Sat Bodegas Noroeste de La Palma,Vega Norte Albillo Criollo Seco,2013,Dry White,13,5,97,D.O.La Palma - Islas Canarias, 
   ,922,Gold,Sat Bodegas Noroeste de La Palma,Acertijo Blanco Seco,2013,Dry White,14,95,D.O.La Palma - Islas Canarias, 
  </code></pre>
  
  <p>im not an PHP expert but i need to create a simple system to read data form a CSV and create a table with the result </p>
  
  <p>and i tried the code above, but i only get the 1st line  </p>
  
  <p>can anyone tell me whats wrong and how i can fix it? </p>