How to display data in tables using Forms API?
The simplest way to do this (on small forms) that I have found is by taking advantage of the #prefix and #suffix elements in the render array. Here's an example:

$form['foo_fieldset'] = array(
  '#type' =&gt; 'fieldset',
  '#prefix' =&gt; '&lt;table&gt;',
  '#suffix' =&gt; '&lt;/table&gt;',
  '#tree' =&gt; TRUE,
);
$form['foo_fieldset']['header'] = array(
  '#markup' =&gt; '&lt;thead&gt;
    &lt;tr&gt;
      &lt;th&gt;A checkbox&lt;/th&gt;
      &lt;th&gt;A text input&lt;/th&gt;
      &lt;th&gt;A text input&lt;/th&gt;
    &lt;/tr&gt;
  &lt;/thead&gt;',
);

for ($i=0;$i&lt;10;$i++) {
  $form['foo_fieldset']['row_' . $i] = array(
    '#prefix' =&gt; '&lt;tr&gt;',
    '#suffix' =&gt; '&lt;/tr&gt;',
  );
  $form['foo_fieldset']['row_' . $i]['checkbox'] = array(
    '#type' =&gt; 'checkbox',
    '#prefix' =&gt; '&lt;td&gt;',
    '#suffix' =&gt; '&lt;/td&gt;',
  );
  $form['foo_fieldset']['row_' . $i]['text_1'] = array(
    '#type' =&gt; 'textfield',
    '#prefix' =&gt; '&lt;td&gt;',
    '#suffix' =&gt; '&lt;/td&gt;',
  );
  $form['foo_fieldset']['row_' . $i]['text_2'] = array(
    '#type' =&gt; 'textfield',
    '#prefix' =&gt; '&lt;td&gt;',
    '#suffix' =&gt; '&lt;/td&gt;',
  );
}


The other way to do it (maybe known as the "right" way) involves building a theming function to render your form in a table. Take a look at this page (ignoring the tablesort options as you don't care about that) to see how it's done: http://coffeeshopped.com/2010/09/drupal-drag-and-drop-tables-in-custom-modules