How to use table class of codeigniter
<p>Is any trick to add edit/delete link in each row  </p>

<blockquote>
  <p>Error in code : Cannot use object of type mysqli as array in
       C:\xampp\htdocs\CodeIgniter-3.0.6\application\views\admin.php on line 8</p>
</blockquote>

<pre><code>&lt;?php 
 $table_property = array('table_open' =&gt; '&lt;table cellpadding="2" cellspacing="1" class="table table-hover"&gt;');
  $this-&gt;table-&gt;set_heading('#Id','Username','Password','Name','Edit','Delete');
  $this-&gt;table-&gt;set_template($table_property);
  $new=$this-&gt;db-&gt;query("select * from tbl_admin");

  foreach($new as $row) {
  $links  = anchor('admin/edit/'.$row['User_ID'] ,'Edit');
  $links .= anchor('admin/delete/'.$row['User_ID'] , 'Delete');


$this-&gt;table-&gt;add_row(
    $row-&gt;User_ID,
    $row-&gt;Username,
    $row-&gt;Password,
    $row-&gt;Full_Name,
    $links
    );
}
echo $this-&gt;table-&gt;generate();
?&gt;
</code></pre>