theme_table drupal 7 issue - operator not supported for strings in theme.inc Although i have found the fix of this problem, but i thought of sharing with others.

Problem is if you mention $rows &amp; theme_table like following:

$row[] = array('data' =&gt; drupal_render($form[$key]['alt_name']), 'class' =&gt; 'alt-ing-name-td');

$output = theme_table(array('header' =&gt; $header, 'rows' =&gt; $rows,'attributes' =&gt; array('id' =&gt; 'recipe-id')));


then you will get following error:

Fatal error: [] operator not supported for strings in theme.inc
To fix this problem you need to mention class &amp; id values in array. 
PFB, the corrections:

$row[] = array('data' =&gt; drupal_render($form[$key]['alt_name']), 'class' =&gt; array('alt-ing-name-td'));

$output = theme_table(array('header' =&gt; $header, 'rows' =&gt; $rows,'attributes' =&gt; array('id' =&gt; array('recipe-id'))));


Hope this will help.