diff options
author | admin <devnull@localhost> | 2006-10-28 07:22:02 +0200 |
---|---|---|
committer | admin <devnull@localhost> | 2006-10-28 07:22:02 +0200 |
commit | 26364b934dc8f7fa25f26e1f172d2a13dd826a15 (patch) | |
tree | 89e83c465e1123de07063266d50fdea246688564 /user_guide/libraries/table.html | |
parent | c7e5999d0b3d5a0742acd5aa57f43bdbae6da6fa (diff) |
Diffstat (limited to 'user_guide/libraries/table.html')
-rw-r--r-- | user_guide/libraries/table.html | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/user_guide/libraries/table.html b/user_guide/libraries/table.html index abe1a2bf0..880017acf 100644 --- a/user_guide/libraries/table.html +++ b/user_guide/libraries/table.html @@ -198,6 +198,36 @@ $this->table->set_template($tmpl); <code>$this->table->add_row('Blue', 'Red', 'Green');</code>
<code>$this->table->add_row(array('Blue', 'Red', 'Green'));</code>
+
+<h2>$this->table->make_columns()</h2>
+
+<p>This function takes a one-dimensional array as input and creates
+a multi-dimensional array with a depth equal to the number of
+columns desired. This allows a single array with many elements to be
+displayed in a table that has a fixed column count. Consider this example:</p>
+
+<code>
+$list = array('one', 'two', 'three', 'four', 'five', 'six', 'seven', 'eight', 'nine', 'ten', 'eleven', 'twelve');<br />
+<br />
+$new_list = $this->table->make_columns($list, 3);<br />
+<br />
+$this->table->generate($new_list)<br />
+<br />
+// Generates a table with this prototype<br />
+<br />
+<table border="0" cellpadding="4" cellspacing="0"><br />
+<tr><br />
+<td>one</td><td>two</td><td>three</td><br />
+</tr><tr><br />
+<td>four</td><td>five</td><td>six</td><br />
+</tr><tr><br />
+<td>seven</td><td>eight</td><td>nine</td><br />
+</tr><tr><br />
+<td>ten</td><td>eleven</td><td>twelve</td></tr><br />
+</table></code>
+
+
+
<h2>$this->table->set_template()</h2>
<p>Permits you to set your template. You can submit a full or partial template.</p>
|