November 2009
Beginner to intermediate
300 pages
5h 43m
English
Another useful library CI offers is the HTML Table class. You can see the details at the online user guide http://codeigniter.com/user_guide/libraries/table.html. But we are going to see some of their uses here. For example, if you spend a lot of time writing things such as:
echo "<tr><td>$value1</td><td>$value2</td></tr>";
CI's Table class allows you to auto-generate HTML tables. Let's display details of some of the tests we've run. You start off by loading the class, as always. Then you can specify the table data as an array, like this:
$this->load->library('table'); $data = array( array('name', 'type', 'time'), array('test 1', 'ping', '1166627335'), array('test 2', 'ping', '1166627335'), array('test ...Read now
Unlock full access