title: Undefined offset issue in explode
body: <p>Firstly I apologise for asking a question which must be somewhat rookie or simple, but I cannot seem to find any code that I've researched to solve my problem.</p>
  
  <p>Notice: Undefined offset: 1 in C:\Users\Joshua\Desktop\USBWebserver v8.5\8.5\root\Assignment\Table.php on line 14</p>
  
  <p>This error continues from Offset 1 - 7.</p>
  
  <p>The code that I am currently using to pull the data from the CSV file is as follows:</p>
  
  <pre><code>&lt;?php
  $fp = fopen ("quotes.csv","r");
  if (!$fp) {echo "&lt;p&gt;Unable to open remote file.&lt;/p&gt;"; exit;}
  ?&gt;
  &lt;table&gt;
  &lt;tr&gt;&lt;th&gt;ID&lt;/th&gt; &lt;th&gt;Price&lt;/th&gt; &lt;th&gt;Volume &lt;/th&gt;&lt;/tr&gt;
  &lt;?php
  
  $i=0;
  while (!feof($fp)):
     $line = fgets($fp, 2048);
     $out[$i] = array($line);
  
     list ($ID, $Price, $StockDate, $StockTime, $Change, $DayHI, $DayLOW, $Volume,) = explode(",", $out[$i][0]);
  
  
     echo "&lt;tr&gt;&lt;td&gt;$ID&lt;/td&gt; &lt;td&gt;$Price&lt;/td&gt; &lt;td&gt;$StockDate &lt;/td&gt;&lt;td&gt;$StockTime&lt;/td&gt; &lt;td&gt;$Change&lt;/td&gt; &lt;td&gt;$DayHI&lt;/td&gt; &lt;td&gt;$DayLOW&lt;/td&gt; &lt;td&gt;$Volume&lt;/td&gt;&lt;/tr&gt;";
     $fp++;
     $i++;
  endwhile;
  
  ?&gt;
  &lt;/table&gt;
  &lt;?php
  
  
  //echo "&lt;p&gt;".$out[0][0]."&lt;/p&gt;";
  //echo "&lt;p&gt;".$out[1][0]."&lt;/p&gt;";
  //echo "&lt;p&gt;".$out[2][0]."&lt;/p&gt;";
  fclose($fp);
  ?&gt;
  </code></pre>
  
  <p>I'm unsure as to how something is undefined as the correct number of values are being called from the CSV. </p>
  
  <p>I understand this isn't a site to teach someone PHP basics but any advice would be appreciated to help solve the problem, I would be appreciative!</p>