Fast HTML5 Table using mytable library |
[eluser]cPage[/eluser]
What we want is to generate a html 5 or xhtml table rapidly. I took users from database for the example. Controller Code: class Users extends CI_Controller View Code: <div id="container"> Note : In the controller, you can get any value by coordinate and use them as a 3D grid. [table][row][column] This example below mean get value at table 1, row 1, column 1. Code: $value = $this->mytable->get(1,1,1); You can also retrieve all data, including field name into an array. Fields names are at table[n], row[0], column[n] Code: $array_of_table_users = $this->mytable->data(); Code: $instance_of_table_users = $this->mytable->objet(); More... Once the html table is create. Ajax or Jquery can access all the td's from the html table by using is ID. Each cell of the table have an ID. For example the cell [1][1][1] value is in <td id="td111">...</td>. Mytable.php must be placed into application/libraries folder. Mytable.php |
Welcome Guest, Not a member yet? Register Sign In |