Unable to generate html using theme_table in block view
Assuming Drupal 7, and assuming $table_rows and $table_headers contain valid data, this is what you need:

$block['content'] = [
  '#theme' =&gt; 'table',
  '#rows' =&gt; $table_rows,
  '#header' =&gt; $table_headers,
  '#empty' =&gt; 'Nothing to see here...',
];