How can I add a class with table theme function to a table header row? How can I apply a class to the &lt;tr&gt; of some table headers using the table theme function?

So, I get this: &lt;tr class='my-class'&gt;&lt;th&gt;foo&lt;/th&gt;&lt;th&gt;bar&lt;/th&gt;&lt;/tr&gt;

...rather than: &lt;tr&gt;&lt;th class='my-class'&gt;foo&lt;/th&gt;&lt;th class='my-class'&gt;bar&lt;/th&gt;&lt;/tr&gt;

...which is all I've managed with this:

$section = array(
  '#theme' =&gt; 'table',
  '#header' =&gt; array(
    array('data' =&gt; 'foo', 'class' =&gt; 'my-class',),
    array('data' =&gt; 'bar', 'class' =&gt; 'my-class',),
  ),
  '#rows' =&gt; $rows,
),


Thanks
If your current example works I'm assuming you are on drupal 6.

You can add attributes to the header array like this:

$section = array(
  '#theme' =&gt; 'table',
  '#header' =&gt; array(
    array('data' =&gt; 'foo', 'class' =&gt; 'cell-class'),
    array('data' =&gt; 'bar', 'class' =&gt; 'cell-class'),
    'class' =&gt; 'row-class',
  ),
  '#rows' =&gt; $rows,
),