HTML table to Drupal table
For the hidden row, you need a second table which would look like:

// This is the hidden table
$table_hidden = '&lt;div class="accordian-body collapse" id="demo1"&gt;';
$table_hidden .= theme('table', array('header' =&gt; $header_hidden, 'rows' =&gt; $rows_hidden));
$table_hidden .= '&lt;/div&gt;';

$row2 = array(
  'data' =&gt; array(
    array(
      'data' =&gt; $table_hidden,
      'colspan' =&gt; '12',
      'class' =&gt; array('hiddenRow'),
    ),
    array('data' =&gt; 'OBS Name',),
  // more array data here
); 


Option 2, a more module-clean way would be to use hook_theme function and create a simple template file where additional markup is placed like so.

function YOURMODULE_theme($existing, $type, $theme, $path) {
  return array(
    'any_name_you_like' =&gt; array(
      'template' =&gt; 'hiddentable', // This called hiddentable.tpl.php
      'arguments' =&gt; array('table' =&gt; null),
    ),
  );
}


Then in your page callback or wherever, you would just need to use your declared theme function like so.

$table_hidden = theme('table', array('header' =&gt; $header_hidden, 'rows' =&gt; $rows_hidden));

$row2 = array(
  'data' =&gt; array(
    array(
      'data' =&gt; theme('any_name_you_like', array('table' =&gt; $table_hidden)),
      'colspan' =&gt; '12',
      'class' =&gt; array('hiddenRow'),
    ),
    array('data' =&gt; 'OBS Name',),
  // more array data here
); 


Now in your hiddentable.tpl.php

&lt;div class="accordian-body collapse" id="demo1"&gt;
  &lt;?php print $variables['table']; ?&gt;
&lt;/div&gt;