Skip to content

Instantly share code, notes, and snippets.

@dergachev
Created February 1, 2012 21:30
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dergachev/1719580 to your computer and use it in GitHub Desktop.
Save dergachev/1719580 to your computer and use it in GitHub Desktop.
<?php
function mymodule_menu_callback() {
$rows = array(
array('Suzanne', 'Front End Dev'),
array('Alex', 'Front End Dev'),
array('Tavish', 'Captain Intern'),
array('Thomas', 'Hand-stand master'),
);
//asks Drupal to render this as a table
return array(
'#theme' => 'table',
'#header' => array('Name', 'Role'),
'#rows' => $rows,
);
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment