Displaying a table from local menu (Drupal 7) I have added a menu item to one of my nodes and I would like to display a table when the user selects this menu.  Here is my menu implementation:

function arcade_projects_menus_menu() {
  $items  =  array();
  $items['node/%/versions'] = array(
    'title' =&gt; 'Versions',
    'description' =&gt; 'Configuration for the User Warn Module.',
    'page callback' =&gt; 'versions_view',
    'access callback' =&gt; 'arcade_versions_access',
    'access arguments' =&gt; array(1), 
    'type' =&gt; MENU_LOCAL_TASK,
  );
  return $items;
}


and here is my page callback:

function versions_view() {
  $block = array();
  $rows = array();
  $header = array('Project Name', 'Screenshot' , 'Updated');
  $format = 'l, F j, Y  - G:i';
  $table = array('rows' =&gt; $rows, 'header' =&gt; $header, 'empty' =&gt; 'No terms found');
  $block['content'] = theme('table', $table);
  return $block;
}


I would expect this code to display an empty table saying 'No terms found' but instead I get a blank white page.  Is it possible to display a table from a page callback?
From a page callback you need to return something that can be run through the render() function. This will either need to be a string, or a properly formatted render array. 

You can use:

$block = theme('table', $table);
return $block;


or

$block['content'] = array(
  '#markup' =&gt; theme('table', $table)
);
return $block;


or even

$block['content'] = array(
  '#theme' =&gt; 'table',
  '#header' =&gt; $header,
  '#rows' =&gt; $rows,
  '#empty' =&gt; t('No terms found')
);


The last method is probably the most preferable in terms of extensibility, as it potentially allows other modules to alter the table before it's rendered. Using either of the other methods will render the table into an HTML string, and other elements in the system will no longer be able to alter it before it's displayed.