cvs: peardoc /en/package/html/html-table intro.xml
| From: | Mark Wiesemann | Date: | Sat, 24 Sep 2005 17:29:18 +0000 |
| Subject: | cvs: peardoc /en/package/html/html-table intro.xml | ||
| Groups: | php.pear.doc | ||
| Request: | Send a blank email to pear-doc+get-6918@lists.php.net to get a copy of this message | ||
wiesemann Sat Sep 24 13:29:18 2005 EDT
Modified files:
/peardoc/en/package/html/html-table intro.xml
Log:
documenting new feature for HTML_Table
http://cvs.php.net/diff.php/peardoc/en/package/html/html-table/intro.xml?r1=1.3&r2=1.4&ty=u
Index: peardoc/en/package/html/html-table/intro.xml
diff -u peardoc/en/package/html/html-table/intro.xml:1.3
peardoc/en/package/html/html-table/intro.xml:1.4
--- peardoc/en/package/html/html-table/intro.xml:1.3 Mon May 9 17:57:01 2005
+++ peardoc/en/package/html/html-table/intro.xml Sat Sep 24 13:29:18 2005
@@ -1,4 +1,4 @@
-<!-- $Revision: 1.3 $ -->
+<!-- $Revision: 1.4 $ -->
<refentry id="package.html.html-table.intro">
<refnamediv>
<refname>Introduction</refname>
@@ -186,6 +186,39 @@
</para>
</refsect2>
+ <refsect2 id="package.html.html-table.intro.create.tgroups">
+ <title>Using thead, tfoot and tbody</title>
+ <para>
+ If you want to divide your tables into thead, tfoot and tbody groups,
+ you need to get table objects using <function>getHeader</function>,
+ <function>getFooter</function> and <function>getBody</function>,
+ which you can then use like the normal table object.
+ <programlisting role="php">
+<![CDATA[
+$table = new HTML_Table();
+$head =& $table->getHeader();
+$foot =& $table->getFooter();
+$body =& $table->getBody();
+$head->setCellContents(...);
+$body->setCellContents(...);
+echo $table->toHtml();
+]]>
+ </programlisting>
+ <note>
+ <para>
+ In this example, there is no content set for the tfoot group.
+ Therefore, only thead and tbody will be rendered.
+ </para>
+ </note>
+ <note>
+ <para>
+ The rendering order is thead, then tfoot and as the last group
+ tbody. This is not a bug but intended behaviour because that's
+ the way it is defined in the (X)HTML Standard.
+ </para>
+ </note>
+ </para>
+ </refsect2>
</refsect1>
</refentry>