Advertisement
kremisoski

Easy CI Table

Apr 8th, 2013
116
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
PHP 0.43 KB | None | 0 0
  1.  $query = $this->db->query("SELECT Name, CountryCode, District, Population FROM city WHERE CountryCode='USA'");
  2.        
  3.         $tmpl = array(
  4.             'table_open' => '<table class="mytable" id="example">',
  5.             'row_start' => '<tr class="odd">',
  6.             'row_alt_start' => '<tr class="even">'
  7.         );
  8.        
  9.         $this->table->set_template($tmpl);
  10.        
  11.         echo $this->table->generate($query);
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement