$j = 0; } // end of HTML_Table example // The initializing code can also be in in the form of an HTML // attr="value" string. // Possible attributes are: // - cache ("true" or "false") // - charset (e.g., "utf-8") // - doctype (e.g., "XHTML Basic 1.0") // - language (two letter designator: e.g., "en") // - lineend ("unix", "win", "mac", custom string) // - mime (e.g., "application/xhtml+xml") // - namespace (string) // - tab (e.g., " ") // All the above have defaults, so it is not necessary // to specify everything. For example, the proper namespace // is chosen by default. $p = new HTML_Page(array('lineend' => 'unix', 'doctype' => 'XHTML 1.0 Strict', 'language' => 'en', 'cache' => 'false')); // Page title defaults to "New XHTML 1.0 Page" $p->setTitle("HTML_Page Color Chart example"); $p->setMetaData("author", "Klaus Guenther"); // let's add a Content-Type meta tag $p->setMetaContentType(); $p->addBodyContent("<h1>Color Chart</h1>"); // Objects with toHtml and toString are supported. $p->addBodyContent(&$table); $p->addBodyContent('<p>Copyright 2003 The PHP Group</p>'); // output to browser $p->display(); // or to a file //$p->toFile('example.html');