title: Tab delimited txt file PHP selecting from array
body: <p>I am trying to select columns in my tab separated document. 
  The problem i am having is i get this error....</p>
  
  <blockquote>
    <p>Notice: Undefined offset: 1 in E:\xampp\htdocs\qrcode\tab.php on line 11 <br>
    Notice: Undefined offset: 2 in E:\xampp\htdocs\qrcode\tab.php on line 12 <br>
    Notice: Undefined offset: 3 in E:\xampp\htdocs\qrcode\tab.php on line 13</p>
  </blockquote>
  
  <p>Code:</p>
  
  <pre><code>$file = "t_rac.txt";// Your Temp Uploaded file
  $handle = fopen($file, "r"); // Make all conditions to avoid errors
  $read = file_get_contents($file); //read
  $lines = explode("\n", $read);//get
  $i= 0;//initialize
  $o=1;
  foreach($lines as $key =&gt; $value){
      $cols[$i] = explode("\t", $value);
  
      $list=($cols[$o++][1]);
      $list.=($cols[$o++][6]);
      $list.=($cols[$o++][7]);
  
  $i++;
  }
  echo $list; 
  </code></pre>