$s = Xml::openElement( 'table', $attribs );
if ( is_array( $headers ) ) {
+ $s = Xml::openElement( 'thead', $attribs );
+
foreach( $headers as $id => $header ) {
$attribs = array();
$s .= Xml::element( 'th', $attribs, $header );
}
+ $s = Xml::closeElement( 'thead' );
}
foreach( $rows as $id => $row ) {
/**
* Build a row for a table
- * @param $attribs An array of attributes to apply to the tr tag
- * @param $cells An array of strings to put in <td>
+ * @param $attribs array An array of attributes to apply to the tr tag
+ * @param $cells array An array of strings to put in <td>
* @return string
*/
public static function buildTableRow( $attribs, $cells ) {