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)); } } echo('