summaryrefslogtreecommitdiffstats
path: root/user_guide/libraries
diff options
context:
space:
mode:
authoradmin <devnull@localhost>2006-10-29 21:24:11 +0100
committeradmin <devnull@localhost>2006-10-29 21:24:11 +0100
commitf3a6204bb0f4538d6a77d9c85c56545be73ecd64 (patch)
tree5f355ad88be33a1f5d35e542984d17b6b6bfb18c /user_guide/libraries
parent23b8f61fe500a179e6f71b07c32752b80eac2e1a (diff)
Diffstat (limited to 'user_guide/libraries')
-rw-r--r--user_guide/libraries/table.html23
1 files changed, 21 insertions, 2 deletions
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("&amp;nbsp;");
</code>
-<h2>$this->table->clear_data()</h2>
+<h2>$this->table->clear()</h2>
<p>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.</p>
+to call this function after each table has been generated to empty the previous table information. Example:</p>
+<code>
+$this->load->library('table');<br />
+<br />
+$this->table->set_heading('Name', 'Color', 'Size');<br />
+$this->table->add_row('Fred', 'Blue', 'Small');<br />
+$this->table->add_row('Mary', 'Red', 'Large');<br />
+$this->table->add_row('John', 'Green', 'Medium');<br />
+<br />
+echo $this->table->generate();<br />
+<br />
+<kbd>$this->table->clear();</kbd><br />
+<br />
+$this->table->set_heading('Name', 'Day', 'Delivery');<br />
+$this->table->add_row('Fred', 'Wednesday', 'Express');<br />
+$this->table->add_row('Mary', 'Monday', 'Air');<br />
+$this->table->add_row('John', 'Saturday', 'Overnight');<br />
+<br />
+echo $this->table->generate();
+</code>
</div>
<!-- END CONTENT -->