From f3a6204bb0f4538d6a77d9c85c56545be73ecd64 Mon Sep 17 00:00:00 2001 From: admin Date: Sun, 29 Oct 2006 20:24:11 +0000 Subject: --- user_guide/libraries/table.html | 23 +++++++++++++++++++++-- 1 file changed, 21 insertions(+), 2 deletions(-) (limited to 'user_guide/libraries') diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html index 715848a82..410bd405a 100644 --- a/user_guide/libraries/table.html +++ b/user_guide/libraries/table.html @@ -248,11 +248,30 @@ $this->table->set_template($tmpl); $this->table->set_empty(" "); -

$this->table->clear_data()

+

$this->table->clear()

Lets you clear the table heading and row data. If you need to show multiple tables with different data you should -to call this function after each table has been generated to empty the previous table information.

+to call this function after each table has been generated to empty the previous table information. Example:

+ +$this->load->library('table');
+
+$this->table->set_heading('Name', 'Color', 'Size');
+$this->table->add_row('Fred', 'Blue', 'Small');
+$this->table->add_row('Mary', 'Red', 'Large');
+$this->table->add_row('John', 'Green', 'Medium');
+
+echo $this->table->generate();
+
+$this->table->clear();
+
+$this->table->set_heading('Name', 'Day', 'Delivery');
+$this->table->add_row('Fred', 'Wednesday', 'Express');
+$this->table->add_row('Mary', 'Monday', 'Air');
+$this->table->add_row('John', 'Saturday', 'Overnight');
+
+echo $this->table->generate(); +
-- cgit v1.2.3-24-g4f1b