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(isset( $row_class[$r]) ? $row_class[$r] : array(), isset($column_class[$c]) ? $column_class[$c] : array())); 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('