title: Table Column to hyperlink
body: <p>I currently have php generating a table from csv. I use  tags to identify columns, which i later use jquery and datatables to sort, filter, and highlight.</p>
  
  <p>I am looking for a way to make the data from a column into links. the data is case numbers and there is a predefinited link, you would just added the case number to the end of it and that would be your link to another page.</p>
  
  <p>Do anyone know how I can achieve this, I'll include a snippet below so you can get an idea of how the table is created.</p>
  
  <pre><code>&lt;th&gt;ASUP Created Flag&lt;/th&gt;
  &lt;/tr&gt;
  &lt;/thead&gt;
  &lt;tbody&gt;
  
  
  END;
  
  //here we open the csv file as read-only
  $f = fopen("cases.csv", "r");
  while (($line = fgetcsv($f)) !== false) {
          echo "&lt;tr&gt;";
  //this starts the alternation of tr and td for building the table        
          foreach ($line as $cell) {
                  echo "&lt;td&gt;" . htmlspecialchars($cell) . "&lt;/td&gt;";
          }
          echo "&lt;/tr&gt;\n";
  }
  fclose($f);
  //after the table has been built, this is where we close it out
  echo "\n&lt;/tbody&gt;&lt;/table&gt;&lt;/section&gt;&lt;/div&gt;&lt;/body&gt;&lt;/html&gt;";
  ?&gt;
  </code></pre>