title: How to put hyperlink in jquery datatables plugin in codeigniter
body: <p>I am using DataTables to generate a table. There is a column containing username</p>
  
  <p>For example: ...</p>
  
  <p>I need every row in this column to have a hyperlink when anyone clicks on username then it redirects to edit page, For example, the first row would be a hyperlink to view?id=1321755 etc.</p>
  
  <p>What is the simplest way I can do so?</p>
  
  <p>Here is my code of view:</p>
  
  <pre><code>&lt;table id="book-table" class="table table-bordered table-striped table-hover"&gt;
       &lt;thead&gt;
       &lt;tr class=""&gt;
        &lt;th&gt;Name&lt;/th&gt;
        &lt;th&gt;Date&lt;/th&gt;
        &lt;th&gt;Work&lt;/th&gt;
        &lt;th&gt;Partner&lt;/th&gt;
        &lt;th&gt;Director&lt;/th&gt;
        &lt;th&gt;Time&lt;/th&gt;
        &lt;th&gt;Task&lt;/th&gt;
        &lt;th&gt;Status&lt;/th&gt;
      &lt;/tr&gt;
       &lt;/thead&gt;
       &lt;tbody&gt;
       &lt;/tbody&gt;
       &lt;/table&gt;
  
  &lt;script type="text/javascript"&gt;
  $(document).ready(function() {
      $('#book-table').DataTable({
          "ajax": {
              url : "&lt;?php echo site_url("digital_admin/hodm/books_page") ?&gt;",
              type : 'GET'
          },
      });
  });
  &lt;/script&gt;
  </code></pre>
  
  <p>Here is my controller code:</p>
  
  <pre><code>public function books_page()
       {
  
            // Datatables Variables
            $draw = intval($this-&gt;input-&gt;get("draw"));
            $start = intval($this-&gt;input-&gt;get("start"));
            $length = intval($this-&gt;input-&gt;get("length"));
  
  
            $books = $this-&gt;pojo-&gt;get_books();
  
            $data = array();
  
            foreach($books-&gt;result() as $r) {
  
                 $data[] = array(
                      $r-&gt;user_name,
                      $r-&gt;date,
                      $r-&gt;t_name,
                      $r-&gt;partner,
                      $r-&gt;director,
                      $r-&gt;duration,
                      $r-&gt;task,
                      $r-&gt;status
                 );
            }
  
            $output = array(
                 "draw" =&gt; $draw,
                   "recordsTotal" =&gt; $books-&gt;num_rows(),
                   "recordsFiltered" =&gt; $books-&gt;num_rows(),
                   "data" =&gt; $data
              );
            echo json_encode($output);
            exit();
       }
  </code></pre>
  
  <p>Kindly help me to find the answer</p>