tag. // tableCells, however, does not have such ability :-/ // Therefore, the row class(es) get replicated to each // cell within the row. foreach ($rows AS $r => &$row) { foreach ($row AS $c => $col) { $cell_class = implode(" ", array_merge(empty( $row_class[$r]) ? array() : $row_class[$r], empty($column_class[$c]) ? array() : $column_class[$c])); if ($cell_class) $row[$c] = array($col, array('class' => $cell_class)); } } // Allow user to specify a list of classes if (isset($class) && is_array($class)) $class = implode(' ', $class); // OK, output the table HTML echo('