How would I add a class with the same name as the header? I'd like to add a class with the same name as the header, in order to keep similar header columns the same size. Basically, the code is generating multiple tables, some of which have the same header items, and some of which do not. All columns with the same header value will take the exact same styling.

$string .= theme('table', array('header' =&gt; array_values($headers[$group]), 'rows' =&gt; $results));


$string is '' at the beginning of this, and I want to add the class to the values in $header - so ideally it would look like this:

&lt;th class="Header"&gt;Header&lt;/th&gt;
You'll want to consider doing this in PHP, by overriding the theme/output markup for each Table Header, specifically using the theme_table() override function to add a class attribute to each table header argument.

Simplified code sample

$table_headers = array(
      array(
        'class' =&gt; array($node-&gt;title), // Adds 'class' HTML attribute.
      ),
      // More code goes here to define the table headers...
    );