'; echo '' . construct_header($headers) . ''; echo 'John25New York'; echo ''; ?>
construct_header($headers); echo $table->toHtml(); ?>In this example, we create an instance of the HTML_Table class (part of the PEAR library) and define an array of header titles ('Item Number', 'Description', 'Price'). We use the construct_header method of the HTML_Table class to generate the HTML markup. We then output the entire table using the toHtml method of the HTML_Table class.