Add class to table in render array I am looking to add a class to a table that I am creating.

I have the code:

$build['table'] = array(
  '#theme' =&gt; 'table',
  '#header' =&gt; $header,
  '#rows' =&gt; $rows,
);


I want to add a class to this table.  I don't have any templates for the view of this table, so I don't really want to have to create a tpl.php for it, but I will if I have too.
Here is description of all parameters that you can pass to theme_table() function http://api.drupal.org/api/drupal/includes%21theme.inc/function/theme_table/7

To add classes for table tag use this code:

$build['table'] = array(
  '#theme' =&gt; 'table',
  '#header' =&gt; $header,
  '#rows' =&gt; $rows,
  '#attributes' =&gt; array (
    'class' =&gt; array('class name goes here'),
  ),
);